From 2f5453641b1cc7482c27fb26c6cc94ad70ec32f5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 00:36:40 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#2293) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- .../create/via_global_ref/builtin/cpython/mac_os.py | 2 +- src/virtualenv/discovery/py_info.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7abfec412..1d7f8cb9c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,12 +20,12 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 21.12b0 + rev: 22.1.0 hooks: - id: black args: [--safe] - repo: https://github.com/asottile/blacken-docs - rev: v1.12.0 + rev: v1.12.1 hooks: - id: blacken-docs additional_dependencies: [black==21.12b0] 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 5e06de2be..d5f246374 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 @@ -198,7 +198,7 @@ def fix_mach_o(exe, current, new, max_size): unneeded bits of information, however Mac OS X 10.5 and earlier cannot read this new Link Edit table format. """ try: - logging.debug(u"change Mach-O for %s from %s to %s", ensure_text(exe), current, ensure_text(new)) + logging.debug("change Mach-O for %s from %s to %s", ensure_text(exe), current, ensure_text(new)) _builtin_change_mach_o(max_size)(exe, current, new) except Exception as e: logging.warning("Could not call _builtin_change_mac_o: %s. " "Trying to call install_name_tool instead.", e) diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/discovery/py_info.py index 4ba65b126..df2cc13fc 100644 --- a/src/virtualenv/discovery/py_info.py +++ b/src/virtualenv/discovery/py_info.py @@ -45,7 +45,7 @@ def abs_path(v): # 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.architecture = 64 if sys.maxsize > 2 ** 32 else 32 + self.architecture = 64 if sys.maxsize > 2**32 else 32 self.version = u(sys.version) self.os = u(os.name) @@ -104,7 +104,7 @@ def abs_path(v): self.sysconfig_vars = {u(i): u(sysconfig.get_config_var(i) or "") for i in config_var_keys} if self.implementation == "PyPy" and sys.version_info.major == 2: - self.sysconfig_vars[u"implementation_lower"] = u"python" + self.sysconfig_vars["implementation_lower"] = "python" confs = {k: (self.system_prefix if v.startswith(self.prefix) else v) for k, v in self.sysconfig_vars.items()} self.system_stdlib = self.sysconfig_path("stdlib", confs) @@ -191,7 +191,7 @@ def sysconfig_path(self, key, config_var=None, sep=os.sep): base = {k: v for k, v in self.sysconfig_vars.items()} base.update(config_var) config_var = base - return pattern.format(**config_var).replace(u"/", sep) + return pattern.format(**config_var).replace("/", sep) def creators(self, refresh=False): if self._creators is None or refresh is True: