From d7e7c32a5f4aa569480582f5e73b8874b1a54482 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 21:10:55 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 21.11b1 → 21.12b0](https://github.com/psf/black/compare/21.11b1...21.12b0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 20cede3b7..1741136df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 21.11b1 + rev: 21.12b0 hooks: - id: black args: [--safe, --quiet] From dd53cc7e388d3c62956d0922ab5d0f3aa8f0adca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 21:12:32 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytest/_argcomplete.py | 1 - src/_pytest/assertion/rewrite.py | 1 - src/_pytest/compat.py | 1 - src/_pytest/pathlib.py | 1 - 4 files changed, 4 deletions(-) diff --git a/src/_pytest/_argcomplete.py b/src/_pytest/_argcomplete.py index 41d9d9407..120f09ff6 100644 --- a/src/_pytest/_argcomplete.py +++ b/src/_pytest/_argcomplete.py @@ -108,7 +108,6 @@ if os.environ.get("_ARGCOMPLETE"): def try_argcomplete(parser: argparse.ArgumentParser) -> None: argcomplete.autocomplete(parser, always_complete_options=False) - else: def try_argcomplete(parser: argparse.ArgumentParser) -> None: diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 456681ab2..50b367e25 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -324,7 +324,6 @@ if sys.platform == "win32": return False return True - else: def _write_pyc( diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py index 7703dee8c..5af01eb7d 100644 --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -192,7 +192,6 @@ if sys.version_info < (3, 7): def nullcontext(): yield - else: from contextlib import nullcontext as nullcontext # noqa: F401 diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index b44753e1a..b23e51d44 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -562,7 +562,6 @@ if sys.platform.startswith("win"): def _is_same(f1: str, f2: str) -> bool: return Path(f1) == Path(f2) or os.path.samefile(f1, f2) - else: def _is_same(f1: str, f2: str) -> bool: