Skip to content

Commit 1ea4781

Browse files
[pre-commit.ci] pre-commit autoupdate (#417)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.4](astral-sh/ruff-pre-commit@v0.14.3...v0.14.4) - [github.com/psf/black-pre-commit-mirror: 25.9.0 → 25.11.0](psf/black-pre-commit-mirror@25.9.0...25.11.0) - [github.com/asottile/pyupgrade: v3.21.0 → v3.21.1](asottile/pyupgrade@v3.21.0...v3.21.1) * [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>
1 parent 1db72de commit 1ea4781

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ ci:
99

1010
repos:
1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.14.3
12+
rev: v0.14.4
1313
hooks:
1414
- id: ruff-check
1515
args: [--fix]
1616

1717
- repo: https://github.com/psf/black-pre-commit-mirror
18-
rev: 25.9.0
18+
rev: 25.11.0
1919
hooks:
2020
- id: black
2121
args: [--preview]
@@ -26,7 +26,7 @@ repos:
2626
- id: autoflake
2727

2828
- repo: https://github.com/asottile/pyupgrade
29-
rev: v3.21.0
29+
rev: v3.21.1
3030
hooks:
3131
- id: pyupgrade
3232
args: [--py310-plus]

tests/test_config_and_args.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,11 @@ def test_200_options(capsys: pytest.CaptureFixture[str]):
166166

167167
@pytest.mark.skipif(flake8 is None, reason="flake8 is not installed")
168168
def test_anyio_from_config(tmp_path: Path, capsys: pytest.CaptureFixture[str]):
169-
assert tmp_path.joinpath(".flake8").write_text(
170-
"""
169+
assert tmp_path.joinpath(".flake8").write_text("""
171170
[flake8]
172171
anyio = True
173172
select = ASYNC220
174-
"""
175-
)
173+
""")
176174

177175
from flake8_async.visitors.visitor2xx import Visitor22X # noqa: PLC0415
178176

@@ -210,24 +208,20 @@ def test_anyio_from_config(tmp_path: Path, capsys: pytest.CaptureFixture[str]):
210208

211209
# `code` parameter temporarily introduced to test deprecation of trio200-blocking-calls
212210
def _test_async200_from_config_common(tmp_path: Path, code: str = "async200") -> str:
213-
assert tmp_path.joinpath(".flake8").write_text(
214-
f"""
211+
assert tmp_path.joinpath(".flake8").write_text(f"""
215212
[flake8]
216213
{code}-blocking-calls =
217214
other -> async,
218215
sync_fns.* -> the_async_equivalent,
219216
select = ASYNC200
220217
extend-ignore = E
221-
"""
222-
)
223-
assert tmp_path.joinpath("example.py").write_text(
224-
"""
218+
""")
219+
assert tmp_path.joinpath("example.py").write_text("""
225220
import sync_fns
226221
227222
async def foo():
228223
sync_fns.takes_a_long_time()
229-
"""
230-
)
224+
""")
231225
return (
232226
"./example.py:5:5: ASYNC200 User-configured blocking sync call sync_fns.* "
233227
"in async function, consider replacing with the_async_equivalent.\n"
@@ -506,13 +500,11 @@ def test_disable_noqa_ast(
506500
@pytest.mark.skipif(flake8 is None, reason="flake8 is not installed")
507501
def test_config_select_error_code(tmp_path: Path) -> None:
508502
# this ... seems to work? I'm confused
509-
assert tmp_path.joinpath(".flake8").write_text(
510-
"""
503+
assert tmp_path.joinpath(".flake8").write_text("""
511504
[flake8]
512505
select = ASYNC100
513506
extend-select = ASYNC100
514-
"""
515-
)
507+
""")
516508
res = subprocess.run(
517509
["flake8", "--help"], cwd=tmp_path, capture_output=True, check=False
518510
)
@@ -523,12 +515,10 @@ def test_config_select_error_code(tmp_path: Path) -> None:
523515
# flake8>=6 enforces three-letter error codes in config
524516
@pytest.mark.skipif(flake8 is None, reason="flake8 is not installed")
525517
def test_config_ignore_error_code(tmp_path: Path) -> None:
526-
assert tmp_path.joinpath(".flake8").write_text(
527-
"""
518+
assert tmp_path.joinpath(".flake8").write_text("""
528519
[flake8]
529520
ignore = ASYNC100
530-
"""
531-
)
521+
""")
532522
res = subprocess.run(
533523
["flake8", "--help"],
534524
cwd=tmp_path,
@@ -545,12 +535,10 @@ def test_config_ignore_error_code(tmp_path: Path) -> None:
545535
# flake8>=6 enforces three-letter error codes in config
546536
@pytest.mark.skipif(flake8 is None, reason="flake8 is not installed")
547537
def test_config_extend_ignore_error_code(tmp_path: Path) -> None:
548-
assert tmp_path.joinpath(".flake8").write_text(
549-
"""
538+
assert tmp_path.joinpath(".flake8").write_text("""
550539
[flake8]
551540
extend-ignore = ASYNC100
552-
"""
553-
)
541+
""")
554542
res = subprocess.run(
555543
["flake8", "--help"],
556544
cwd=tmp_path,

0 commit comments

Comments
 (0)