Skip to content

Commit ee318ae

Browse files
[pre-commit.ci] pre-commit autoupdate (#439)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.8 → v0.15.9](astral-sh/ruff-pre-commit@v0.15.8...v0.15.9) - [github.com/pre-commit/mirrors-mypy: v1.19.1 → v1.20.0](pre-commit/mirrors-mypy@v1.19.1...v1.20.0) * fix test files matching literals to async function return value, which mypy now correctly marks as unreachable --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: jakkdl <h6+github@pm.me>
1 parent 038cba5 commit ee318ae

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.pre-commit-config.yaml

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

1010
repos:
1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.15.8
12+
rev: v0.15.9
1313
hooks:
1414
- id: ruff-check
1515
args: [--fix]
@@ -39,7 +39,7 @@ repos:
3939
- id: isort
4040

4141
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: v1.19.1
42+
rev: v1.20.0
4343
hooks:
4444
- id: mypy
4545
# uses py311 syntax, mypy configured for py310

tests/autofix_files/async91x_autofix.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async def match_subject() -> None:
156156
async def match_not_all_cases() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno)
157157
None
158158
):
159-
match foo():
159+
match bar():
160160
case 1:
161161
...
162162
case _:
@@ -203,7 +203,7 @@ async def match_all_cases() -> None:
203203
async def match_fallback_await_in_guard() -> None:
204204
# The case guard is only executed if the pattern matches, so we can mostly treat
205205
# it as part of the body, except for a special case for fallback+checkpointing guard.
206-
match foo():
206+
match bar():
207207
case 1 if await foo():
208208
...
209209
case _ if await foo():
@@ -212,7 +212,7 @@ async def match_fallback_await_in_guard() -> None:
212212

213213
async def match_checkpoint_guard() -> None:
214214
# The above pattern is quite cursed, but this seems fairly reasonable to do.
215-
match foo():
215+
match bar():
216216
case 1 if await foo():
217217
...
218218
case _:
@@ -222,7 +222,7 @@ async def match_checkpoint_guard() -> None:
222222
async def match_not_checkpoint_in_all_guards() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno)
223223
None
224224
):
225-
match foo():
225+
match bar():
226226
case 1:
227227
...
228228
case _ if await foo():

tests/eval_files/async91x_autofix.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async def match_subject() -> None:
140140
async def match_not_all_cases() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno)
141141
None
142142
):
143-
match foo():
143+
match bar():
144144
case 1:
145145
...
146146
case _:
@@ -184,7 +184,7 @@ async def match_all_cases() -> None:
184184
async def match_fallback_await_in_guard() -> None:
185185
# The case guard is only executed if the pattern matches, so we can mostly treat
186186
# it as part of the body, except for a special case for fallback+checkpointing guard.
187-
match foo():
187+
match bar():
188188
case 1 if await foo():
189189
...
190190
case _ if await foo():
@@ -193,7 +193,7 @@ async def match_fallback_await_in_guard() -> None:
193193

194194
async def match_checkpoint_guard() -> None:
195195
# The above pattern is quite cursed, but this seems fairly reasonable to do.
196-
match foo():
196+
match bar():
197197
case 1 if await foo():
198198
...
199199
case _:
@@ -203,7 +203,7 @@ async def match_checkpoint_guard() -> None:
203203
async def match_not_checkpoint_in_all_guards() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno)
204204
None
205205
):
206-
match foo():
206+
match bar():
207207
case 1:
208208
...
209209
case _ if await foo():

0 commit comments

Comments
 (0)