diff options
| author | Bernát Gábor <gaborjbernat@gmail.com> | 2022-08-04 01:39:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-04 01:39:15 -0700 |
| commit | fd064dc08f69faeba740234d76960575ec988a6f (patch) | |
| tree | 5b3e209abae7a4e812a6ea7771dd2dace073494d /src | |
| parent | a45c7d6e50df826e6c4b264bcb645276cbde5d83 (diff) | |
| download | virtualenv-fd064dc08f69faeba740234d76960575ec988a6f.tar.gz | |
Bump dependencies and build tools (#2394)
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
Diffstat (limited to 'src')
31 files changed, 74 insertions, 74 deletions
diff --git a/src/virtualenv/activation/activator.py b/src/virtualenv/activation/activator.py index ad9d9e0..fb813bc 100644 --- a/src/virtualenv/activation/activator.py +++ b/src/virtualenv/activation/activator.py @@ -13,7 +13,7 @@ class Activator(metaclass=ABCMeta): self.flag_prompt = os.path.basename(os.getcwd()) if options.prompt == "." else options.prompt @classmethod - def supports(cls, interpreter): + def supports(cls, interpreter): # noqa: U100 """Check if the activation script is supported in the given interpreter. :param interpreter: the interpreter we need to support @@ -22,7 +22,7 @@ class Activator(metaclass=ABCMeta): return True @classmethod - def add_parser_arguments(cls, parser, interpreter): + def add_parser_arguments(cls, parser, interpreter): # noqa: U100 """ Add CLI arguments for this activation script. @@ -31,7 +31,7 @@ class Activator(metaclass=ABCMeta): """ @abstractmethod - def generate(self, creator): + def generate(self, creator): # noqa: U100 """Generate activate script for the given creator. :param creator: the creator (based of :class:`virtualenv.create.creator.Creator`) we used to create this \ diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py index 75ecd83..bfb9744 100644 --- a/src/virtualenv/activation/via_template.py +++ b/src/virtualenv/activation/via_template.py @@ -23,7 +23,7 @@ class ViaTemplateActivator(Activator, metaclass=ABCMeta): creator.pyenv_cfg["prompt"] = self.flag_prompt return generated - def replacements(self, creator, dest_folder): + def replacements(self, creator, dest_folder): # noqa: U100 return { "__VIRTUAL_PROMPT__": "" if self.flag_prompt is None else self.flag_prompt, "__VIRTUAL_ENV__": str(creator.dest), @@ -55,8 +55,8 @@ class ViaTemplateActivator(Activator, metaclass=ABCMeta): return text @staticmethod - def _repr_unicode(creator, value): - return value # by default we just let it be unicode + def _repr_unicode(creator, value): # noqa: U100 + return value # by default, we just let it be unicode __all__ = [ diff --git a/src/virtualenv/app_data/base.py b/src/virtualenv/app_data/base.py index bc28b23..ecaee78 100644 --- a/src/virtualenv/app_data/base.py +++ b/src/virtualenv/app_data/base.py @@ -20,7 +20,7 @@ class AppData(metaclass=ABCMeta): """called when the user passes in the reset app data""" @abstractmethod - def py_info(self, path): + def py_info(self, path): # noqa: U100 raise NotImplementedError @abstractmethod @@ -32,7 +32,7 @@ class AppData(metaclass=ABCMeta): raise NotImplementedError @abstractmethod - def embed_update_log(self, distribution, for_py_version): + def embed_update_log(self, distribution, for_py_version): # noqa: U100 raise NotImplementedError @property @@ -44,7 +44,7 @@ class AppData(metaclass=ABCMeta): raise NotImplementedError @abstractmethod - def wheel_image(self, for_py_version, name): + def wheel_image(self, for_py_version, name): # noqa: U100 raise NotImplementedError @contextmanager @@ -58,12 +58,12 @@ class AppData(metaclass=ABCMeta): @abstractmethod @contextmanager - def extract(self, path, to_folder): + def extract(self, path, to_folder): # noqa: U100 raise NotImplementedError @abstractmethod @contextmanager - def locked(self, path): + def locked(self, path): # noqa: U100 raise NotImplementedError @@ -77,7 +77,7 @@ class ContentStore(metaclass=ABCMeta): raise NotImplementedError @abstractmethod - def write(self, content): + def write(self, content): # noqa: U100 raise NotImplementedError @abstractmethod diff --git a/src/virtualenv/app_data/na.py b/src/virtualenv/app_data/na.py index da45f58..784c76b 100644 --- a/src/virtualenv/app_data/na.py +++ b/src/virtualenv/app_data/na.py @@ -20,17 +20,17 @@ class AppDataDisabled(AppData): def reset(self): """do nothing""" - def py_info(self, path): + def py_info(self, path): # noqa: U100 return ContentStoreNA() - def embed_update_log(self, distribution, for_py_version): + def embed_update_log(self, distribution, for_py_version): # noqa: U100 return ContentStoreNA() - def extract(self, path, to_folder): + def extract(self, path, to_folder): # noqa: U100 raise self.error @contextmanager - def locked(self, path): + def locked(self, path): # noqa: U100 """do nothing""" yield @@ -38,7 +38,7 @@ class AppDataDisabled(AppData): def house(self): raise self.error - def wheel_image(self, for_py_version, name): + def wheel_image(self, for_py_version, name): # noqa: U100 raise self.error def py_info_clear(self): @@ -53,7 +53,7 @@ class ContentStoreNA(ContentStore): """nothing to read""" return None - def write(self, content): + def write(self, content): # noqa: U100 """nothing to write""" def remove(self): diff --git a/src/virtualenv/app_data/read_only.py b/src/virtualenv/app_data/read_only.py index 2663731..b11f4a6 100644 --- a/src/virtualenv/app_data/read_only.py +++ b/src/virtualenv/app_data/read_only.py @@ -23,12 +23,12 @@ class ReadOnlyAppData(AppDataDiskFolder): def py_info(self, path): return _PyInfoStoreDiskReadOnly(self.py_info_at, path) - def embed_update_log(self, distribution, for_py_version): + def embed_update_log(self, distribution, for_py_version): # noqa: U100 raise NotImplementedError class _PyInfoStoreDiskReadOnly(PyInfoStoreDisk): - def write(self, content): + def write(self, content): # noqa: U100 raise RuntimeError("read-only app data python info cannot be updated") diff --git a/src/virtualenv/app_data/via_disk_folder.py b/src/virtualenv/app_data/via_disk_folder.py index 94c4def..ad8292c 100644 --- a/src/virtualenv/app_data/via_disk_folder.py +++ b/src/virtualenv/app_data/via_disk_folder.py @@ -130,7 +130,7 @@ class JSONStoreDisk(ContentStore, metaclass=ABCMeta): return data except ValueError: bad_format = True - except Exception: # noqa + except Exception: pass if bad_format: try: diff --git a/src/virtualenv/app_data/via_tempdir.py b/src/virtualenv/app_data/via_tempdir.py index c15741a..7854642 100644 --- a/src/virtualenv/app_data/via_tempdir.py +++ b/src/virtualenv/app_data/via_tempdir.py @@ -21,7 +21,7 @@ class TempAppData(AppDataDiskFolder): logging.debug("remove temporary app data folder %s", self.lock.path) safe_delete(self.lock.path) - def embed_update_log(self, distribution, for_py_version): + def embed_update_log(self, distribution, for_py_version): # noqa: U100 raise NotImplementedError diff --git a/src/virtualenv/config/convert.py b/src/virtualenv/config/convert.py index 52f722e..38d3551 100644 --- a/src/virtualenv/config/convert.py +++ b/src/virtualenv/config/convert.py @@ -43,7 +43,7 @@ class ListType(TypeData): def _validate(self): """ """ - def convert(self, value, flatten=True): + def convert(self, value, flatten=True): # noqa: U100 values = self.split_values(value) result = [] for value in values: diff --git a/src/virtualenv/create/creator.py b/src/virtualenv/create/creator.py index ad41bfe..a95b6e2 100644 --- a/src/virtualenv/create/creator.py +++ b/src/virtualenv/create/creator.py @@ -53,7 +53,7 @@ class Creator(metaclass=ABCMeta): ] @classmethod - def can_create(cls, interpreter): + def can_create(cls, interpreter): # noqa: U100 """Determine if we can create a virtual environment. :param interpreter: the interpreter in question @@ -63,7 +63,7 @@ class Creator(metaclass=ABCMeta): return True @classmethod - def add_parser_arguments(cls, parser, interpreter, meta, app_data): + def add_parser_arguments(cls, parser, interpreter, meta, app_data): # noqa: U100 """Add CLI arguments for the creator. :param parser: the CLI parser diff --git a/src/virtualenv/create/debug.py b/src/virtualenv/create/debug.py index 0cdaa49..583d999 100644 --- a/src/virtualenv/create/debug.py +++ b/src/virtualenv/create/debug.py @@ -28,7 +28,7 @@ def run(): except ImportError: # pragma: no cover # this is possible if the standard library cannot be accessed # noinspection PyPep8Naming - OrderedDict = dict # pragma: no cover + OrderedDict = dict # pragma: no cover # noqa: N806 result = OrderedDict([("sys", OrderedDict())]) path_keys = ( "executable", diff --git a/src/virtualenv/create/describe.py b/src/virtualenv/create/describe.py index fade5c4..8575267 100644 --- a/src/virtualenv/create/describe.py +++ b/src/virtualenv/create/describe.py @@ -61,7 +61,7 @@ class Describe(metaclass=ABCMeta): return {k: (to if v.startswith(self.interpreter.prefix) else v) for k, v in sys_vars.items()} @classmethod - def can_describe(cls, interpreter): + def can_describe(cls, interpreter): # noqa: U100 """Knows means it knows how the output will look""" return True diff --git a/src/virtualenv/create/via_global_ref/_virtualenv.py b/src/virtualenv/create/via_global_ref/_virtualenv.py index 6c51ca0..faee64c 100644 --- a/src/virtualenv/create/via_global_ref/_virtualenv.py +++ b/src/virtualenv/create/via_global_ref/_virtualenv.py @@ -48,7 +48,7 @@ if sys.version_info > (3, 4): # See https://github.com/pypa/virtualenv/issues/1895 for details. lock = [] - def find_spec(self, fullname, path, target=None): + def find_spec(self, fullname, path, target=None): # noqa: U100 if fullname in _DISTUTILS_PATCH and self.fullname is None: # initialize lock[0] lazily if len(self.lock) == 0: diff --git a/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py b/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py index 5a9eb85..9e29234 100644 --- a/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py +++ b/src/virtualenv/create/via_global_ref/builtin/cpython/cpython2.py @@ -17,7 +17,7 @@ class CPython2(CPython, Python2, metaclass=abc.ABCMeta): # include folder needed on Python 2 as we don't have pyenv.cfg host_include_marker = cls.host_include_marker(interpreter) if host_include_marker.exists(): - yield PathRefToDest(host_include_marker.parent, dest=lambda self, _: self.include) + yield PathRefToDest(host_include_marker.parent, dest=lambda self, _: self.include) # noqa: U101 @classmethod def needs_stdlib_py_module(cls): @@ -57,7 +57,7 @@ class CPython2PosixBase(CPython2, CPythonPosix, metaclass=abc.ABCMeta): make_file = Path(interpreter.sysconfig["makefile_filename"]) if make_file.exists() and str(make_file).startswith(interpreter.prefix): under_prefix = make_file.relative_to(Path(interpreter.prefix)) - yield PathRefToDest(make_file, dest=lambda self, s: self.dest / under_prefix) + yield PathRefToDest(make_file, dest=lambda self, s: self.dest / under_prefix) # noqa: U100 class CPython2Posix(CPython2PosixBase): diff --git a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py index 16da661..9fc2550 100644 --- a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py +++ b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py @@ -75,11 +75,11 @@ class CPython2macOsFramework(CPythonmacOsFramework, CPython2PosixBase): # add a copy of the host python image exe = Path(interpreter.prefix) / "Python" - yield PathRefToDest(exe, dest=lambda self, _: self.dest / "Python", must=RefMust.COPY) + yield PathRefToDest(exe, dest=lambda self, _: self.dest / "Python", must=RefMust.COPY) # noqa: U101 # add a symlink to the Resources dir resources = Path(interpreter.prefix) / "Resources" - yield PathRefToDest(resources, dest=lambda self, _: self.dest / "Resources") + yield PathRefToDest(resources, dest=lambda self, _: self.dest / "Resources") # noqa: U101 @property def reload_code(self): @@ -149,7 +149,7 @@ class CPython3macOsFramework(CPythonmacOsFramework, CPython3, CPythonPosix): # add a symlink to the host python image exe = Path(interpreter.prefix) / "Python3" - yield PathRefToDest(exe, dest=lambda self, _: self.dest / ".Python", must=RefMust.SYMLINK) + yield PathRefToDest(exe, dest=lambda self, _: self.dest / ".Python", must=RefMust.SYMLINK) # noqa: U101 @property def reload_code(self): @@ -207,14 +207,14 @@ def fix_mach_o(exe, current, new, max_size): def _builtin_change_mach_o(maxint): - MH_MAGIC = 0xFEEDFACE - MH_CIGAM = 0xCEFAEDFE - MH_MAGIC_64 = 0xFEEDFACF - MH_CIGAM_64 = 0xCFFAEDFE - FAT_MAGIC = 0xCAFEBABE - BIG_ENDIAN = ">" - LITTLE_ENDIAN = "<" - LC_LOAD_DYLIB = 0xC + MH_MAGIC = 0xFEEDFACE # noqa: N806 + MH_CIGAM = 0xCEFAEDFE # noqa: N806 + MH_MAGIC_64 = 0xFEEDFACF # noqa: N806 + MH_CIGAM_64 = 0xCFFAEDFE # noqa: N806 + FAT_MAGIC = 0xCAFEBABE # noqa: N806 + BIG_ENDIAN = ">" # noqa: N806 + LITTLE_ENDIAN = "<" # noqa: N806 + LC_LOAD_DYLIB = 0xC # noqa: N806 class FileView: """A proxy for file-like objects that exposes a given view of a file. Modified from macholib.""" diff --git a/src/virtualenv/create/via_global_ref/builtin/pypy/common.py b/src/virtualenv/create/via_global_ref/builtin/pypy/common.py index 97fa963..17cf733 100644 --- a/src/virtualenv/create/via_global_ref/builtin/pypy/common.py +++ b/src/virtualenv/create/via_global_ref/builtin/pypy/common.py @@ -44,7 +44,7 @@ class PyPy(ViaGlobalRefVirtualenvBuiltin, metaclass=abc.ABCMeta): yield from cls._shared_libs(python_dir) @classmethod - def _shared_libs(cls, python_dir): + def _shared_libs(cls, python_dir): # noqa: U100 raise NotImplementedError diff --git a/src/virtualenv/create/via_global_ref/builtin/pypy/pypy2.py b/src/virtualenv/create/via_global_ref/builtin/pypy/pypy2.py index 9f2343f..8031339 100644 --- a/src/virtualenv/create/via_global_ref/builtin/pypy/pypy2.py +++ b/src/virtualenv/create/via_global_ref/builtin/pypy/pypy2.py @@ -23,7 +23,7 @@ class PyPy2(PyPy, Python2, metaclass=abc.ABCMeta): # include folder needed on Python 2 as we don't have pyenv.cfg host_include_marker = cls.host_include_marker(interpreter) if host_include_marker.exists(): - yield PathRefToDest(host_include_marker.parent, dest=lambda self, _: self.include) + yield PathRefToDest(host_include_marker.parent, dest=lambda self, _: self.include) # noqa: U101 @classmethod def needs_stdlib_py_module(cls): @@ -93,7 +93,7 @@ class PyPy2Posix(PyPy2, PosixSupports): yield from super().sources(interpreter) host_lib = Path(interpreter.system_prefix) / "lib" if host_lib.exists(): - yield PathRefToDest(host_lib, dest=lambda self, _: self.lib) + yield PathRefToDest(host_lib, dest=lambda self, _: self.lib) # noqa: U101 class Pypy2Windows(PyPy2, WindowsSupports): diff --git a/src/virtualenv/create/via_global_ref/builtin/ref.py b/src/virtualenv/create/via_global_ref/builtin/ref.py index fb1cf2e..60d97b3 100644 --- a/src/virtualenv/create/via_global_ref/builtin/ref.py +++ b/src/virtualenv/create/via_global_ref/builtin/ref.py @@ -78,7 +78,7 @@ class PathRef(metaclass=ABCMeta): return self._can_symlink @abstractmethod - def run(self, creator, symlinks): + def run(self, creator, symlinks): # noqa: U100 raise NotImplementedError def method(self, symlinks): diff --git a/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py b/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py index 2d491cc..d00ee45 100644 --- a/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py +++ b/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py @@ -52,7 +52,7 @@ class ViaGlobalRefVirtualenvBuiltin(ViaGlobalRefApi, VirtualenvBuiltin, metaclas meta.sources.append(src) @classmethod - def setup_meta(cls, interpreter): + def setup_meta(cls, interpreter): # noqa: U100 return BuiltinViaGlobalRefMeta() @classmethod @@ -64,7 +64,7 @@ class ViaGlobalRefVirtualenvBuiltin(ViaGlobalRefApi, VirtualenvBuiltin, metaclas return self.bin_dir / src.name @classmethod - def _executables(cls, interpreter): + def _executables(cls, interpreter): # noqa: U100 raise NotImplementedError def create(self): diff --git a/src/virtualenv/discovery/discover.py b/src/virtualenv/discovery/discover.py index 8950a55..d44758c 100644 --- a/src/virtualenv/discovery/discover.py +++ b/src/virtualenv/discovery/discover.py @@ -5,7 +5,7 @@ class Discover(metaclass=ABCMeta): """Discover and provide the requested Python interpreter""" @classmethod - def add_parser_arguments(cls, parser): + def add_parser_arguments(cls, parser): # noqa: U100 """Add CLI arguments for this discovery mechanisms. :param parser: the CLI parser diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/discovery/py_info.py index 09a3dc1..2a648e0 100644 --- a/src/virtualenv/discovery/py_info.py +++ b/src/virtualenv/discovery/py_info.py @@ -44,7 +44,7 @@ class PythonInfo(object): self.pypy_version_info = tuple(u(i) for i in sys.pypy_version_info) # this is a tuple in earlier, struct later, unify to our own named tuple - self.version_info = VersionInfo(*list(u(i) for i in sys.version_info)) + self.version_info = VersionInfo(*[u(i) for i in sys.version_info]) self.architecture = 64 if sys.maxsize > 2**32 else 32 # Used to determine some file names. @@ -486,7 +486,7 @@ class PythonInfo(object): # or at root level candidate_folder[inside_folder] = None - return list(i for i in candidate_folder.keys() if os.path.exists(i)) + return [i for i in candidate_folder.keys() if os.path.exists(i)] def _find_possible_exe_names(self): name_candidate = OrderedDict() diff --git a/src/virtualenv/run/__init__.py b/src/virtualenv/run/__init__.py index 8f18cd9..6d22b71 100644 --- a/src/virtualenv/run/__init__.py +++ b/src/virtualenv/run/__init__.py @@ -46,7 +46,7 @@ def session_via_cli(args, options=None, setup_logging=True, env=None): parser, elements = build_parser(args, options, setup_logging, env) options = parser.parse_args(args) creator, seeder, activators = tuple(e.create(options) for e in elements) # create types - of_session = Session(options.verbosity, options.app_data, parser._interpreter, creator, seeder, activators) # noqa + of_session = Session(options.verbosity, options.app_data, parser._interpreter, creator, seeder, activators) return of_session @@ -134,7 +134,7 @@ def add_version_flag(parser): def _do_report_setup(parser, args, setup_logging): - level_map = ", ".join(f"{logging.getLevelName(l)}={c}" for c, l in sorted(list(LEVELS.items()))) + level_map = ", ".join(f"{logging.getLevelName(l)}={c}" for c, l in sorted(LEVELS.items())) msg = "verbosity = verbose - quiet, default {}, mapping => {}" verbosity_group = parser.add_argument_group( title="verbosity", diff --git a/src/virtualenv/run/plugin/base.py b/src/virtualenv/run/plugin/base.py index 5fbf81b..3eb8ab3 100644 --- a/src/virtualenv/run/plugin/base.py +++ b/src/virtualenv/run/plugin/base.py @@ -44,7 +44,7 @@ class ComponentBuilder(PluginLoader): cls._OPTIONS = cls.entry_points_for(key) return cls._OPTIONS - def add_selector_arg_parse(self, name, choices): + def add_selector_arg_parse(self, name, choices): # noqa: U100 raise NotImplementedError def handle_selected_arg_parse(self, options): diff --git a/src/virtualenv/run/session.py b/src/virtualenv/run/session.py index 84777fe..2c8821c 100644 --- a/src/virtualenv/run/session.py +++ b/src/virtualenv/run/session.py @@ -65,7 +65,7 @@ class Session: def __enter__(self): return self - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, exc_type, exc_val, exc_tb): # noqa: U100 self._app_data.close() diff --git a/src/virtualenv/seed/embed/base_embed.py b/src/virtualenv/seed/embed/base_embed.py index b0bcbc3..f29110b 100644 --- a/src/virtualenv/seed/embed/base_embed.py +++ b/src/virtualenv/seed/embed/base_embed.py @@ -43,7 +43,7 @@ class BaseEmbed(Seeder, metaclass=ABCMeta): } @classmethod - def add_parser_arguments(cls, parser, interpreter, app_data): + def add_parser_arguments(cls, parser, interpreter, app_data): # noqa: U100 group = parser.add_mutually_exclusive_group() group.add_argument( "--no-download", diff --git a/src/virtualenv/seed/embed/via_app_data/pip_install/base.py b/src/virtualenv/seed/embed/via_app_data/pip_install/base.py index 3c44b77..0640929 100644 --- a/src/virtualenv/seed/embed/via_app_data/pip_install/base.py +++ b/src/virtualenv/seed/embed/via_app_data/pip_install/base.py @@ -23,7 +23,7 @@ class PipInstall(metaclass=ABCMeta): self._console_entry_points = None @abstractmethod - def _sync(self, src, dst): + def _sync(self, src, dst): # noqa: U100 raise NotImplementedError def install(self, version_info): @@ -108,7 +108,7 @@ class PipInstall(metaclass=ABCMeta): return self.__dist_info @abstractmethod - def _fix_records(self, extra_record_data): + def _fix_records(self, extra_record_data): # noqa: U100 raise NotImplementedError @property diff --git a/src/virtualenv/seed/embed/via_app_data/via_app_data.py b/src/virtualenv/seed/embed/via_app_data/via_app_data.py index 743ed15..f31ecf6 100644 --- a/src/virtualenv/seed/embed/via_app_data/via_app_data.py +++ b/src/virtualenv/seed/embed/via_app_data/via_app_data.py @@ -53,10 +53,10 @@ class FromAppData(BaseEmbed): if not installer.has_image(): installer.build_image() installer.install(creator.interpreter.version_info) - except Exception: # noqa + except Exception: exceptions[name] = sys.exc_info() - threads = list(Thread(target=_install, args=(n, w)) for n, w in name_to_whl.items()) + threads = [Thread(target=_install, args=(n, w)) for n, w in name_to_whl.items()] for thread in threads: thread.start() for thread in threads: @@ -91,7 +91,7 @@ class FromAppData(BaseEmbed): ) if result is not None: break - except Exception as exception: # noqa + except Exception as exception: logging.exception("fail") failure = exception if failure: @@ -113,10 +113,10 @@ class FromAppData(BaseEmbed): with lock: name_to_whl[distribution] = result - threads = list( + threads = [ Thread(target=_get, args=(distribution, version)) for distribution, version in self.distribution_to_versions().items() - ) + ] for thread in threads: thread.start() for thread in threads: diff --git a/src/virtualenv/seed/seeder.py b/src/virtualenv/seed/seeder.py index a14e483..0d26bd0 100644 --- a/src/virtualenv/seed/seeder.py +++ b/src/virtualenv/seed/seeder.py @@ -14,7 +14,7 @@ class Seeder(metaclass=ABCMeta): self.env = options.env @classmethod - def add_parser_arguments(cls, parser, interpreter, app_data): + def add_parser_arguments(cls, parser, interpreter, app_data): # noqa: U100 """ Add CLI arguments for this seed mechanisms. @@ -25,7 +25,7 @@ class Seeder(metaclass=ABCMeta): raise NotImplementedError @abstractmethod - def run(self, creator): + def run(self, creator): # noqa: U100 """Perform the seed operation. :param creator: the creator (based of :class:`virtualenv.create.creator.Creator`) we used to create this \ diff --git a/src/virtualenv/seed/wheels/periodic_update.py b/src/virtualenv/seed/wheels/periodic_update.py index ec95bf5..2088c9d 100644 --- a/src/virtualenv/seed/wheels/periodic_update.py +++ b/src/virtualenv/seed/wheels/periodic_update.py @@ -318,7 +318,7 @@ def release_date_for_wheel_path(dest): def _request_context(): yield None # fallback to non verified HTTPS (the information we request is not sensitive, so fallback) - yield ssl._create_unverified_context() # noqa + yield ssl._create_unverified_context() _PYPI_CACHE = {} diff --git a/src/virtualenv/util/lock.py b/src/virtualenv/util/lock.py index 04c9f9c..512d1c9 100644 --- a/src/virtualenv/util/lock.py +++ b/src/virtualenv/util/lock.py @@ -58,17 +58,17 @@ class PathLockBase(metaclass=ABCMeta): raise NotImplementedError @abstractmethod - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, exc_type, exc_val, exc_tb): # noqa: U100 raise NotImplementedError @abstractmethod @contextmanager - def lock_for_key(self, name, no_block=False): + def lock_for_key(self, name, no_block=False): # noqa: U100 raise NotImplementedError @abstractmethod @contextmanager - def non_reentrant_lock_for_key(name): + def non_reentrant_lock_for_key(self, name): # noqa: U100 raise NotImplementedError @@ -99,7 +99,7 @@ class ReentrantFileLock(PathLockBase): self._lock = self._create_lock() self._lock_file(self._lock) - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, exc_type, exc_val, exc_tb): # noqa: U100 self._release(self._lock) self._del_lock(self._lock) self._lock = None @@ -148,15 +148,15 @@ class NoOpFileLock(PathLockBase): def __enter__(self): raise NotImplementedError - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, exc_type, exc_val, exc_tb): # noqa: U100 raise NotImplementedError @contextmanager - def lock_for_key(self, name, no_block=False): + def lock_for_key(self, name, no_block=False): # noqa: U100 yield @contextmanager - def non_reentrant_lock_for_key(self, name): + def non_reentrant_lock_for_key(self, name): # noqa: U100 yield diff --git a/src/virtualenv/util/path/_sync.py b/src/virtualenv/util/path/_sync.py index 10c793d..604379d 100644 --- a/src/virtualenv/util/path/_sync.py +++ b/src/virtualenv/util/path/_sync.py @@ -49,7 +49,7 @@ def copytree(src, dest): def safe_delete(dest): - def onerror(func, path, exc_info): + def onerror(func, path, exc_info): # noqa: U100 if not os.access(path, os.W_OK): os.chmod(path, S_IWUSR) func(path) diff --git a/src/virtualenv/util/path/_win.py b/src/virtualenv/util/path/_win.py index 8dd81c9..d83eabb 100644 --- a/src/virtualenv/util/path/_win.py +++ b/src/virtualenv/util/path/_win.py @@ -6,7 +6,7 @@ def get_short_path_name(long_name): import ctypes from ctypes import wintypes - _GetShortPathNameW = ctypes.windll.kernel32.GetShortPathNameW + _GetShortPathNameW = ctypes.windll.kernel32.GetShortPathNameW # noqa: N806 _GetShortPathNameW.argtypes = [wintypes.LPCWSTR, wintypes.LPWSTR, wintypes.DWORD] _GetShortPathNameW.restype = wintypes.DWORD output_buf_size = 0 |
