From c8eaed07633e8b5bf9652194393209af63b7c4f0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 16:53:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 4 ++-- src/tox/helper/get_version.py | 2 +- src/tox/interpreters/py_spec.py | 2 +- tests/unit/config/test_config.py | 2 +- tests/unit/test_pytest_plugins.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 734049330..1ea3fcbe6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,8 +25,8 @@ def generate_draft_news(): issue = f"{home}/issue" fragments_path = ROOT_SRC_TREE_DIR / "docs" / "changelog" for pattern, replacement in ( - (r"[^`]@([^,\s]+)", fr"`@\1 <{home}/\1>`_"), - (r"[^`]#([\d]+)", fr"`#pr\1 <{issue}/\1>`_"), + (r"[^`]@([^,\s]+)", rf"`@\1 <{home}/\1>`_"), + (r"[^`]#([\d]+)", rf"`#pr\1 <{issue}/\1>`_"), ): for path in fragments_path.glob("*.rst"): path.write_text(re.sub(pattern, replacement, path.read_text())) diff --git a/src/tox/helper/get_version.py b/src/tox/helper/get_version.py index 8f370e5a5..40acdc256 100644 --- a/src/tox/helper/get_version.py +++ b/src/tox/helper/get_version.py @@ -10,7 +10,7 @@ "implementation": platform.python_implementation(), "version_info": list(sys.version_info), "version": sys.version, - "is_64": sys.maxsize > 2 ** 32, + "is_64": sys.maxsize > 2**32, "sysplatform": sys.platform, "os_sep": os.sep, "extra_version_info": getattr(sys, "pypy_version_info", None), diff --git a/src/tox/interpreters/py_spec.py b/src/tox/interpreters/py_spec.py index 06151b217..7b079e811 100644 --- a/src/tox/interpreters/py_spec.py +++ b/src/tox/interpreters/py_spec.py @@ -71,6 +71,6 @@ def from_name(cls, base_python): "pypy" if tox.constants.INFO.IS_PYPY else "python", sys.version_info[0], sys.version_info[1], - 64 if sys.maxsize > 2 ** 32 else 32, + 64 if sys.maxsize > 2**32 else 32, sys.executable, ) diff --git a/tests/unit/config/test_config.py b/tests/unit/config/test_config.py index d6ff0aba4..77526c1ea 100644 --- a/tests/unit/config/test_config.py +++ b/tests/unit/config/test_config.py @@ -3575,7 +3575,7 @@ def test_config_via_pyproject_legacy(initproj): initproj( "config_via_pyproject_legacy-0.5", filedefs={ - "pyproject.toml": u''' + "pyproject.toml": ''' [project] description = "Factory ⸻ A code generator 🏭" authors = [{name = "Łukasz Langa"}] diff --git a/tests/unit/test_pytest_plugins.py b/tests/unit/test_pytest_plugins.py index e806d0c88..30525fd3c 100644 --- a/tests/unit/test_pytest_plugins.py +++ b/tests/unit/test_pytest_plugins.py @@ -119,7 +119,7 @@ def test_run_result_repr(capfd): with RunResult(["hello", "world"], capfd) as run_result: # simulate tox writing some unicode output stdout_buffer = getattr(sys.stdout, "buffer", sys.stdout) - stdout_buffer.write(u"\u2603".encode("UTF-8")) + stdout_buffer.write("\u2603".encode("UTF-8")) # must not `UnicodeError` on repr(...) ret = repr(run_result)