diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cde90d9..d8a7123 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.8 + rev: v0.15.9 hooks: - id: ruff-check args: [--fix] @@ -39,7 +39,7 @@ repos: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.19.1 + rev: v1.20.0 hooks: - id: mypy # uses py311 syntax, mypy configured for py310 diff --git a/tests/autofix_files/async91x_autofix.py b/tests/autofix_files/async91x_autofix.py index 746166a..50f1e99 100644 --- a/tests/autofix_files/async91x_autofix.py +++ b/tests/autofix_files/async91x_autofix.py @@ -156,7 +156,7 @@ async def match_subject() -> None: async def match_not_all_cases() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno) None ): - match foo(): + match bar(): case 1: ... case _: @@ -203,7 +203,7 @@ async def match_all_cases() -> None: async def match_fallback_await_in_guard() -> None: # The case guard is only executed if the pattern matches, so we can mostly treat # it as part of the body, except for a special case for fallback+checkpointing guard. - match foo(): + match bar(): case 1 if await foo(): ... case _ if await foo(): @@ -212,7 +212,7 @@ async def match_fallback_await_in_guard() -> None: async def match_checkpoint_guard() -> None: # The above pattern is quite cursed, but this seems fairly reasonable to do. - match foo(): + match bar(): case 1 if await foo(): ... case _: @@ -222,7 +222,7 @@ async def match_checkpoint_guard() -> None: async def match_not_checkpoint_in_all_guards() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno) None ): - match foo(): + match bar(): case 1: ... case _ if await foo(): diff --git a/tests/eval_files/async91x_autofix.py b/tests/eval_files/async91x_autofix.py index f5e22d4..aecf45a 100644 --- a/tests/eval_files/async91x_autofix.py +++ b/tests/eval_files/async91x_autofix.py @@ -140,7 +140,7 @@ async def match_subject() -> None: async def match_not_all_cases() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno) None ): - match foo(): + match bar(): case 1: ... case _: @@ -184,7 +184,7 @@ async def match_all_cases() -> None: async def match_fallback_await_in_guard() -> None: # The case guard is only executed if the pattern matches, so we can mostly treat # it as part of the body, except for a special case for fallback+checkpointing guard. - match foo(): + match bar(): case 1 if await foo(): ... case _ if await foo(): @@ -193,7 +193,7 @@ async def match_fallback_await_in_guard() -> None: async def match_checkpoint_guard() -> None: # The above pattern is quite cursed, but this seems fairly reasonable to do. - match foo(): + match bar(): case 1 if await foo(): ... case _: @@ -203,7 +203,7 @@ async def match_checkpoint_guard() -> None: async def match_not_checkpoint_in_all_guards() -> ( # ASYNC910: 0, "exit", Statement("function definition", lineno) None ): - match foo(): + match bar(): case 1: ... case _ if await foo():