diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-07-24 22:38:26 +0200 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-07-24 22:38:26 +0200 |
commit | a58abed83f51c263547294fbfb57e5a44a32e5a3 (patch) | |
tree | 6d01e1ea95e531b33fe352696849cd65d3c4a7ad /setuptools/package_index.py | |
parent | 9505e8bf8b0ca5cf33befc3f8818cb519c74cc0c (diff) | |
download | external_python_setuptools-a58abed83f51c263547294fbfb57e5a44a32e5a3.tar.gz external_python_setuptools-a58abed83f51c263547294fbfb57e5a44a32e5a3.tar.bz2 external_python_setuptools-a58abed83f51c263547294fbfb57e5a44a32e5a3.zip |
Re-indent several function signatures to reduce linter warnings
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 76421c3b..4c2e10f9 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -109,9 +109,10 @@ def distros_for_filename(filename, metadata=None): ) -def interpret_distro_name(location, basename, metadata, - py_version=None, precedence=SOURCE_DIST, platform=None -): +def interpret_distro_name( + location, basename, metadata, py_version=None, precedence=SOURCE_DIST, + platform=None + ): """Generate alternative interpretations of a source distro name Note: if `location` is a filesystem filename, you should call @@ -255,9 +256,10 @@ class HashChecker(ContentChecker): class PackageIndex(Environment): """A distribution index that scans web pages for download URLs""" - def __init__(self, index_url="https://pypi.python.org/simple", hosts=('*',), - ca_bundle=None, verify_ssl=True, *args, **kw - ): + def __init__( + self, index_url="https://pypi.python.org/simple", hosts=('*',), + ca_bundle=None, verify_ssl=True, *args, **kw + ): Environment.__init__(self,*args,**kw) self.index_url = index_url + "/"[:not index_url.endswith('/')] self.scanned_urls = {} @@ -378,7 +380,7 @@ class PackageIndex(Environment): # process an index page into the package-page index for match in HREF.finditer(page): try: - scan( urljoin(url, htmldecode(match.group(1))) ) + scan(urljoin(url, htmldecode(match.group(1)))) except ValueError: pass @@ -530,10 +532,10 @@ class PackageIndex(Environment): return getattr(self.fetch_distribution(spec, tmpdir),'location',None) - def fetch_distribution(self, - requirement, tmpdir, force_scan=False, source=False, develop_ok=False, - local_index=None - ): + def fetch_distribution( + self, requirement, tmpdir, force_scan=False, source=False, + develop_ok=False, local_index=None + ): """Obtain a distribution suitable for fulfilling `requirement` `requirement` must be a ``pkg_resources.Requirement`` instance. @@ -616,7 +618,8 @@ class PackageIndex(Environment): def gen_setup(self, filename, fragment, tmpdir): match = EGG_FRAGMENT.match(fragment) - dists = match and [d for d in + dists = match and [ + d for d in interpret_distro_name(filename, match.group(1), None) if d.version ] or [] @@ -722,9 +725,11 @@ class PackageIndex(Environment): if warning: self.warn(warning, v.line) else: - raise DistutilsError('%s returned a bad status line. ' - 'The server might be down, %s' % \ - (url, v.line)) + raise DistutilsError( + '%s returned a bad status line. The server might be ' + 'down, %s' % + (url, v.line) + ) except httplib.HTTPException: v = sys.exc_info()[1] if warning: |