Skip to content

Commit 411ebb6

Browse files
[pre-commit.ci] pre-commit autoupdate (#346)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.3 → v0.9.4](astral-sh/ruff-pre-commit@v0.9.3...v0.9.4) - [github.com/psf/black: 24.10.0 → 25.1.0](psf/black@24.10.0...25.1.0) - [github.com/RobertCraigie/pyright-python: v1.1.392.post0 → v1.1.393](RobertCraigie/pyright-python@v1.1.392.post0...v1.1.393) - [github.com/codespell-project/codespell: v2.4.0 → v2.4.1](codespell-project/codespell@v2.4.0...v2.4.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 7a2a67b commit 411ebb6

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

.pre-commit-config.yaml

+4-4
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.9.3
12+
rev: v0.9.4
1313
hooks:
1414
- id: ruff
1515
args: [--fix]
1616

1717
- repo: https://github.com/psf/black
18-
rev: 24.10.0
18+
rev: 25.1.0
1919
hooks:
2020
- id: black
2121
args: [--preview]
@@ -45,7 +45,7 @@ repos:
4545
exclude: tests/eval_files/.*_py311.py
4646

4747
- repo: https://github.com/RobertCraigie/pyright-python
48-
rev: v1.1.392.post0
48+
rev: v1.1.393
4949
hooks:
5050
- id: pyright
5151
# ignore warnings about new version being available, no other warnings
@@ -66,7 +66,7 @@ repos:
6666
- trio
6767

6868
- repo: https://github.com/codespell-project/codespell
69-
rev: v2.4.0
69+
rev: v2.4.1
7070
hooks:
7171
- id: codespell
7272
additional_dependencies:

flake8_async/visitors/visitor2xx.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ class Visitor22X(Visitor200):
186186
"Sync call {} in async function, use "
187187
"`asyncio.create_subprocess_[exec/shell]."
188188
),
189-
"ASYNC222": "Sync call {} in async function, wrap in `{}.to_thread.run_sync()`.",
189+
"ASYNC222": (
190+
"Sync call {} in async function, wrap in `{}.to_thread.run_sync()`."
191+
),
190192
"ASYNC222_asyncio": (
191193
"Sync call {} in async function, use `asyncio.loop.run_in_executor`."
192194
),
@@ -397,7 +399,7 @@ def visit_Call(self, node: ast.Call):
397399
@error_class
398400
class Visitor25X(Visitor200):
399401
error_codes: Mapping[str, str] = {
400-
"ASYNC250": ("Blocking sync call `input()` in async function. Wrap in `{}`."),
402+
"ASYNC250": "Blocking sync call `input()` in async function. Wrap in `{}`.",
401403
"ASYNC251": (
402404
"Blocking sync call `time.sleep(...)` in async function."
403405
" Use `await {}.sleep(...)`."

flake8_async/visitors/visitor91x.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ class Visitor91X(Flake8AsyncVisitor_cst, CommonVisitors):
357357
"CancelScope with no guaranteed cancel point. This makes it potentially "
358358
"impossible to cancel."
359359
),
360-
"ASYNC913": ("Indefinite loop with no guaranteed cancel points."),
360+
"ASYNC913": "Indefinite loop with no guaranteed cancel points.",
361361
"ASYNC100": (
362362
"{0}.{1} context contains no checkpoints, remove the context or add"
363363
" `await {0}.lowlevel.checkpoint()`."

flake8_async/visitors/visitors.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,10 @@ def visit_Call(self, node: ast.Call):
319319
@error_class
320320
class Visitor119(Flake8AsyncVisitor):
321321
error_codes: Mapping[str, str] = {
322-
"ASYNC119": "Yield in contextmanager in async generator might not trigger"
323-
" cleanup. Use `@asynccontextmanager` or refactor."
322+
"ASYNC119": (
323+
"Yield in contextmanager in async generator might not trigger"
324+
" cleanup. Use `@asynccontextmanager` or refactor."
325+
)
324326
}
325327

326328
def __init__(self, *args: Any, **kwargs: Any):
@@ -490,8 +492,10 @@ def leave_IfExp_test(self, node: cst.IfExp):
490492
@disabled_by_default
491493
class Visitor900(Flake8AsyncVisitor):
492494
error_codes: Mapping[str, str] = {
493-
"ASYNC900": "Async generator not allowed, unless transformed "
494-
"by a known decorator (one of: {})."
495+
"ASYNC900": (
496+
"Async generator not allowed, unless transformed "
497+
"by a known decorator (one of: {})."
498+
)
495499
}
496500

497501
def __init__(self, *args: Any, **kwargs: Any):

tests/eval_files/async111.py

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import trio
1010
import trio as noterror
1111

12-
1312
# shed/black breaks up a *ton* of lines since adding more detailed error messages, so
1413
# disable formatting to avoid having to adjust a ton of line references
1514
# fmt: off

0 commit comments

Comments
 (0)