[pre-commit.ci] pre-commit autoupdate (#8699)

* [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>
This commit is contained in:
pre-commit-ci[bot] 2021-05-26 11:19:45 +03:00 committed by GitHub
parent ef9d01826a
commit c5bf5f6fb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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]

View File

@ -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:

View File

@ -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