@@ -54,7 +54,7 @@ def test_native_parser_is_used_without_node_aware_hooks(monkeypatch: pytest.Monk
5454 """Use Ruff when installed extensions do not require the concrete source AST."""
5555 calls = 0
5656
57- def prune (code : str , python_minor : int ) -> str : # noqa: ARG001
57+ def prune (code : str ) -> str :
5858 nonlocal calls
5959 calls += 1
6060 return code
@@ -69,7 +69,7 @@ def test_native_parser_is_skipped_without_functions(monkeypatch: pytest.MonkeyPa
6969 """Avoid paying for a second parse when no implementation suite can be removed."""
7070 calls = 0
7171
72- def prune (code : str , python_minor : int ) -> str : # noqa: ARG001
72+ def prune (code : str ) -> str :
7373 nonlocal calls
7474 calls += 1
7575 return code
@@ -84,7 +84,7 @@ def test_native_parser_is_skipped_for_stub_files(monkeypatch: pytest.MonkeyPatch
8484 """Avoid pruning stub files, whose function bodies contain no implementations."""
8585 calls = 0
8686
87- def prune (code : str , python_minor : int ) -> str : # noqa: ARG001
87+ def prune (code : str ) -> str :
8888 nonlocal calls
8989 calls += 1
9090 return code
@@ -99,7 +99,7 @@ def test_node_aware_hooks_force_cpython_fallback(monkeypatch: pytest.MonkeyPatch
9999 """Keep complete CPython nodes available to visit-time extension callbacks."""
100100 calls = 0
101101
102- def prune (code : str , python_minor : int ) -> str : # noqa: ARG001
102+ def prune (code : str ) -> str :
103103 nonlocal calls
104104 calls += 1
105105 return code
@@ -114,7 +114,7 @@ def test_custom_visitors_can_disable_native_pruning(monkeypatch: pytest.MonkeyPa
114114 """Keep the complete tree available to Visitor subclasses with custom traversal."""
115115 calls = 0
116116
117- def prune (code : str , python_minor : int ) -> str : # noqa: ARG001
117+ def prune (code : str ) -> str :
118118 nonlocal calls
119119 calls += 1
120120 return code
@@ -131,7 +131,7 @@ class CustomVisitor(Visitor):
131131
132132def test_cpython_retries_an_invalid_native_result (monkeypatch : pytest .MonkeyPatch ) -> None :
133133 """Never expose a diagnostic caused by native source pruning."""
134- monkeypatch .setattr (parser_module , "prune_source" , lambda code , python_minor : "def invalid(: pass" )
134+ monkeypatch .setattr (parser_module , "prune_source" , lambda code : "def invalid(: pass" )
135135
136136 node = parser_module ._compile_module ("def valid(): pass" , filename = "module.py" , extensions = Extensions ())
137137
@@ -140,7 +140,7 @@ def test_cpython_retries_an_invalid_native_result(monkeypatch: pytest.MonkeyPatc
140140
141141def test_cpython_compiles_untouched_source_when_native_declines (monkeypatch : pytest .MonkeyPatch ) -> None :
142142 """Use the normal source when Ruff cannot prune it."""
143- monkeypatch .setattr (parser_module , "prune_source" , lambda code , python_minor : None )
143+ monkeypatch .setattr (parser_module , "prune_source" , lambda code : None )
144144
145145 node = parser_module ._compile_module ("def valid(): pass" , filename = "module.py" , extensions = Extensions ())
146146
0 commit comments