diff options
author | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2020-12-31 13:08:18 +0100 |
---|---|---|
committer | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2020-12-31 19:01:22 +0100 |
commit | fc891f5cf6d93ad533e2afb5e15a2952408ab358 (patch) | |
tree | ebe67de5500e5be0891b0b64edd09e0177b74c80 /setuptools/command | |
parent | c225c4c0f64bf044f2f82693df097ad07f9c12bd (diff) | |
download | python-setuptools-git-fc891f5cf6d93ad533e2afb5e15a2952408ab358.tar.gz |
Apply noqa C901 comments to overly complex code
Diffstat (limited to 'setuptools/command')
-rw-r--r-- | setuptools/command/bdist_egg.py | 2 | ||||
-rw-r--r-- | setuptools/command/easy_install.py | 19 | ||||
-rw-r--r-- | setuptools/command/egg_info.py | 2 |
3 files changed, 14 insertions, 9 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index a88efb45..206f2419 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -153,7 +153,7 @@ class bdist_egg(Command): self.run_command(cmdname) return cmd - def run(self): + def run(self): # noqa: C901 # is too complex (14) # FIXME # Generate metadata first self.run_command("egg_info") # We run install_lib before install_data, because some data hacks diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 6882efe0..f1e487d4 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -226,7 +226,7 @@ class easy_install(Command): print(tmpl.format(**locals())) raise SystemExit() - def finalize_options(self): + def finalize_options(self): # noqa: C901 # is too complex (25) # FIXME self.version and self._render_version() py_version = sys.version.split()[0] @@ -437,7 +437,7 @@ class easy_install(Command): def warn_deprecated_options(self): pass - def check_site_dir(self): + def check_site_dir(self): # noqa: C901 # is too complex (12) # FIXME """Verify that self.install_dir is .pth-capable dir, if needed""" instdir = normalize_path(self.install_dir) @@ -713,7 +713,10 @@ class easy_install(Command): if getattr(self, attrname) is None: setattr(self, attrname, scheme[key]) - def process_distribution(self, requirement, dist, deps=True, *info): + # FIXME: 'easy_install.process_distribution' is too complex (12) + def process_distribution( # noqa: C901 + self, requirement, dist, deps=True, *info, + ): self.update_pth(dist) self.package_index.add(dist) if dist in self.local_index[dist.key]: @@ -894,7 +897,8 @@ class easy_install(Command): metadata = EggMetadata(zipimport.zipimporter(egg_path)) return Distribution.from_filename(egg_path, metadata=metadata) - def install_egg(self, egg_path, tmpdir): + # FIXME: 'easy_install.install_egg' is too complex (11) + def install_egg(self, egg_path, tmpdir): # noqa: C901 destination = os.path.join( self.install_dir, os.path.basename(egg_path), @@ -993,7 +997,8 @@ class easy_install(Command): # install the .egg return self.install_egg(egg_path, tmpdir) - def exe_to_egg(self, dist_filename, egg_tmp): + # FIXME: 'easy_install.exe_to_egg' is too complex (12) + def exe_to_egg(self, dist_filename, egg_tmp): # noqa: C901 """Extract a bdist_wininst to the directories an egg would use""" # Check for .pth file and set up prefix translations prefixes = get_exe_prefixes(dist_filename) @@ -1191,7 +1196,7 @@ class easy_install(Command): cfg_filename = os.path.join(base, 'setup.cfg') setopt.edit_config(cfg_filename, settings) - def update_pth(self, dist): + def update_pth(self, dist): # noqa: C901 # is too complex (11) # FIXME if self.pth_file is None: return @@ -1427,7 +1432,7 @@ def get_site_dirs(): return sitedirs -def expand_paths(inputs): +def expand_paths(inputs): # noqa: C901 # is too complex (11) # FIXME """Yield sys.path directories that might contain "old-style" packages""" seen = {} diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8e34e4a2..1f120b67 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -32,7 +32,7 @@ from setuptools.extern import packaging from setuptools import SetuptoolsDeprecationWarning -def translate_pattern(glob): +def translate_pattern(glob): # noqa: C901 # is too complex (14) # FIXME """ Translate a file path glob like '*.txt' in to a regular expression. This differs from fnmatch.translate which allows wildcards to match |