Run isort on project
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
parent
d860708ec9
commit
70f88ed37d
10
bin/euscan
10
bin/euscan
@ -17,23 +17,21 @@ __description__ = "A tool to detect new upstream releases."
|
||||
|
||||
# Imports
|
||||
|
||||
import sys
|
||||
import getopt
|
||||
import sys
|
||||
from errno import EINTR, EINVAL
|
||||
from http.client import HTTPConnection
|
||||
|
||||
from portage import settings
|
||||
from portage.output import white, yellow, turquoise, green
|
||||
from portage.exception import AmbiguousPackageName
|
||||
|
||||
from gentoolkit import pprinter as pp
|
||||
from gentoolkit.errors import GentoolkitException
|
||||
from portage import settings
|
||||
from portage.exception import AmbiguousPackageName
|
||||
from portage.output import green, turquoise, white, yellow
|
||||
|
||||
from euscan import CONFIG, output
|
||||
from euscan.out import progress_bar
|
||||
from euscan._version import __version__
|
||||
|
||||
|
||||
# Globals
|
||||
isatty = os.environ.get("TERM") != "dumb" and sys.stdout.isatty()
|
||||
isatty_stderr = os.environ.get("TERM") != "dumb" and sys.stderr.isatty()
|
||||
|
@ -1,20 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import urllib
|
||||
from tempfile import mkstemp
|
||||
import tarfile
|
||||
import gzip
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tarfile
|
||||
import urllib
|
||||
from difflib import unified_diff
|
||||
from tempfile import mkstemp
|
||||
|
||||
from portage.exception import AmbiguousPackageName
|
||||
from gentoolkit.query import Query
|
||||
from BeautifulSoup import BeautifulSoup, SoupStrainer
|
||||
|
||||
from gentoolkit.query import Query
|
||||
from portage.exception import AmbiguousPackageName
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -7,7 +7,6 @@ import configparser
|
||||
import os
|
||||
from ast import literal_eval
|
||||
|
||||
|
||||
CONFIG = {
|
||||
"nocolor": False,
|
||||
"quiet": False,
|
||||
|
@ -1,13 +1,10 @@
|
||||
import importlib
|
||||
import os
|
||||
import sys
|
||||
import importlib
|
||||
|
||||
import portage
|
||||
from portage import _encodings, _shell_quote, _unicode_decode, _unicode_encode
|
||||
from portage.const import VDB_PATH
|
||||
from portage import _encodings
|
||||
from portage import _shell_quote
|
||||
from portage import _unicode_decode
|
||||
from portage import _unicode_encode
|
||||
|
||||
|
||||
# Stolen from the ebuild command
|
||||
|
@ -1,11 +1,11 @@
|
||||
import os
|
||||
import sys
|
||||
import pkgutil
|
||||
|
||||
from euscan import CONFIG, output
|
||||
import sys
|
||||
|
||||
from portage.xml.metadata import MetaDataXML
|
||||
|
||||
from euscan import CONFIG, output
|
||||
|
||||
handlers = {"package": [], "url": [], "all": {}}
|
||||
|
||||
# autoimport all modules in this directory and append them to handlers list
|
||||
|
@ -1,11 +1,13 @@
|
||||
import re
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
import portage
|
||||
|
||||
from euscan.helpers import regex_from_template
|
||||
from euscan.handlers.url import process_scan as url_scan
|
||||
from euscan import output
|
||||
from euscan.handlers.url import process_scan as url_scan
|
||||
from euscan.helpers import regex_from_template
|
||||
|
||||
HANDLER_NAME = "berlios"
|
||||
CONFIDENCE = 90
|
||||
|
@ -1,9 +1,12 @@
|
||||
import re
|
||||
import portage
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import json
|
||||
import re
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
from euscan import helpers, output, mangling
|
||||
import portage
|
||||
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "cpan"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,11 +1,13 @@
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
import re
|
||||
import bz2
|
||||
import re
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import zlib
|
||||
|
||||
import portage
|
||||
|
||||
from euscan import mangling, helpers, output
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "deb"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,9 +1,11 @@
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
import re
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
import portage
|
||||
|
||||
from euscan import mangling, helpers, output
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "freecode"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,8 +1,10 @@
|
||||
from urllib.parse import urljoin, urlparse
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import re
|
||||
import io
|
||||
import difflib
|
||||
import io
|
||||
import re
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from urllib.parse import urljoin, urlparse
|
||||
|
||||
try:
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
@ -12,13 +14,13 @@ except ImportError:
|
||||
import portage
|
||||
|
||||
from euscan import (
|
||||
output,
|
||||
helpers,
|
||||
mangling,
|
||||
CONFIG,
|
||||
SCANDIR_BLACKLIST_URLS,
|
||||
BRUTEFORCE_BLACKLIST_PACKAGES,
|
||||
BRUTEFORCE_BLACKLIST_URLS,
|
||||
CONFIG,
|
||||
SCANDIR_BLACKLIST_URLS,
|
||||
helpers,
|
||||
mangling,
|
||||
output,
|
||||
)
|
||||
|
||||
HANDLER_NAME = "generic"
|
||||
|
@ -1,10 +1,12 @@
|
||||
import json
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import re
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
import portage
|
||||
|
||||
from euscan import helpers, output, mangling
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "github"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
try:
|
||||
import simplejson as json
|
||||
@ -10,7 +12,7 @@ except ImportError:
|
||||
|
||||
import portage
|
||||
|
||||
from euscan import mangling, helpers, output
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "gnome"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,9 +1,10 @@
|
||||
import re
|
||||
|
||||
import portage
|
||||
|
||||
from euscan import output
|
||||
from euscan.helpers import regex_from_template
|
||||
from euscan.handlers.url import process_scan as url_scan
|
||||
from euscan.helpers import regex_from_template
|
||||
|
||||
HANDLER_NAME = "google-code"
|
||||
CONFIDENCE = 90
|
||||
|
@ -1,9 +1,12 @@
|
||||
import re
|
||||
import portage
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
import xml.dom.minidom
|
||||
|
||||
from euscan import helpers, output, mangling
|
||||
import portage
|
||||
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "php"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,9 +1,9 @@
|
||||
import xmlrpc.client
|
||||
import re
|
||||
import xmlrpc.client
|
||||
|
||||
import portage
|
||||
|
||||
from euscan import mangling, helpers, output
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "pypi"
|
||||
CONFIDENCE = 100
|
||||
|
@ -1,9 +1,12 @@
|
||||
import re
|
||||
import portage
|
||||
import json
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import re
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
from euscan import helpers, output, mangling
|
||||
import portage
|
||||
|
||||
from euscan import helpers, mangling, output
|
||||
|
||||
HANDLER_NAME = "rubygems"
|
||||
CONFIDENCE = 100
|
||||
|
@ -2,9 +2,9 @@ import re
|
||||
|
||||
import portage
|
||||
|
||||
from euscan.helpers import regex_from_template
|
||||
from euscan.handlers.url import process_scan as url_scan
|
||||
from euscan import output
|
||||
from euscan.handlers.url import process_scan as url_scan
|
||||
from euscan.helpers import regex_from_template
|
||||
|
||||
HANDLER_NAME = "sourceforge"
|
||||
CONFIDENCE = 90
|
||||
|
@ -1,8 +1,10 @@
|
||||
import re
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
from euscan import helpers, output
|
||||
from euscan.handlers import generic
|
||||
from euscan import output, helpers
|
||||
|
||||
PRIORITY = 100
|
||||
|
||||
|
@ -1,21 +1,22 @@
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
import errno
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
from xml.dom.minidom import Document
|
||||
|
||||
import portage
|
||||
from portage import dep
|
||||
|
||||
try:
|
||||
from urllib import robotparser
|
||||
from urllib import urlparse
|
||||
from urllib import robotparser, urlparse
|
||||
except ImportError:
|
||||
import urllib.robotparser
|
||||
import urllib.parse
|
||||
|
||||
import euscan
|
||||
from euscan import CONFIG, BLACKLIST_VERSIONS, ROBOTS_TXT_BLACKLIST_DOMAINS
|
||||
from euscan import BLACKLIST_VERSIONS, CONFIG, ROBOTS_TXT_BLACKLIST_DOMAINS
|
||||
from euscan.version import parse_version
|
||||
|
||||
|
||||
@ -267,7 +268,7 @@ def urlallowed(url):
|
||||
if baseurl in rpcache:
|
||||
rp = rpcache[baseurl]
|
||||
else:
|
||||
from socket import setdefaulttimeout, getdefaulttimeout
|
||||
from socket import getdefaulttimeout, setdefaulttimeout
|
||||
|
||||
timeout = getdefaulttimeout()
|
||||
setdefaulttimeout(5)
|
||||
|
@ -1,14 +1,14 @@
|
||||
import sys
|
||||
from io import StringIO
|
||||
from collections import defaultdict
|
||||
import json
|
||||
import signal
|
||||
import time
|
||||
import re
|
||||
import signal
|
||||
import sys
|
||||
import time
|
||||
from collections import defaultdict
|
||||
from io import StringIO
|
||||
|
||||
import portage
|
||||
from portage.output import EOutput, TermProgressBar
|
||||
from gentoolkit import pprinter as pp
|
||||
from portage.output import EOutput, TermProgressBar
|
||||
|
||||
from euscan.helpers import dict_to_xml
|
||||
|
||||
|
@ -2,18 +2,16 @@ import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
import portage
|
||||
|
||||
import gentoolkit.pprinter as pp
|
||||
from gentoolkit.query import Query
|
||||
import portage
|
||||
from gentoolkit.package import Package
|
||||
from gentoolkit.query import Query
|
||||
|
||||
from euscan import CONFIG, BLACKLIST_PACKAGES
|
||||
from euscan import handlers, output
|
||||
from euscan.out import from_mirror
|
||||
from euscan.helpers import version_blacklisted
|
||||
from euscan.version import is_version_stable
|
||||
from euscan import BLACKLIST_PACKAGES, CONFIG, handlers, output
|
||||
from euscan.ebuild import package_from_ebuild
|
||||
from euscan.helpers import version_blacklisted
|
||||
from euscan.out import from_mirror
|
||||
from euscan.version import is_version_stable
|
||||
|
||||
|
||||
def filter_versions(cp, versions):
|
||||
|
Loading…
Reference in New Issue
Block a user