From c5bf5f6fb05ab5eb36509313b6e10e03a7486589 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 26 May 2021 11:19:45 +0300 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#8699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v2.16.0 → v2.18.2](https://github.com/asottile/pyupgrade/compare/v2.16.0...v2.18.2) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- src/_pytest/config/__init__.py | 2 +- testing/test_junitxml.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ac7fcc3d..83f7b697b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - id: reorder-python-imports args: ['--application-directories=.:src', --py36-plus] - repo: https://github.com/asottile/pyupgrade - rev: v2.16.0 + rev: v2.18.2 hooks: - id: pyupgrade args: [--py36-plus] diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 7f18f62cb..c32ccb6ea 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -1611,7 +1611,7 @@ def parse_warning_filter( raise warnings._OptionError(f"too many fields (max 5): {arg!r}") while len(parts) < 5: parts.append("") - action_, message, category_, module, lineno_ = [s.strip() for s in parts] + action_, message, category_, module, lineno_ = (s.strip() for s in parts) action: str = warnings._getaction(action_) # type: ignore[attr-defined] category: Type[Warning] = warnings._getcategory(category_) # type: ignore[attr-defined] if message and escape: diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index 139e2a9a7..5cb062932 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -1388,7 +1388,7 @@ def test_runs_twice(pytester: Pytester, run_and_parse: RunAndParse) -> None: result, dom = run_and_parse(f, f) result.stdout.no_fnmatch_line("*INTERNALERROR*") - first, second = [x["classname"] for x in dom.find_by_tag("testcase")] + first, second = (x["classname"] for x in dom.find_by_tag("testcase")) assert first == second @@ -1406,7 +1406,7 @@ def test_runs_twice_xdist( result, dom = run_and_parse(f, "--dist", "each", "--tx", "2*popen") result.stdout.no_fnmatch_line("*INTERNALERROR*") - first, second = [x["classname"] for x in dom.find_by_tag("testcase")] + first, second = (x["classname"] for x in dom.find_by_tag("testcase")) assert first == second