@@ -110,7 +110,7 @@ def get_function_benchmark_timings(trace_path: Path) -> dict[str, dict[Benchmark
110110
111111 # Process each row
112112 for row in cursor .fetchall ():
113- module_name , class_name , function_name , benchmark_file , benchmark_func , benchmark_line , time_ns = row
113+ module_name , class_name , function_name , benchmark_file , benchmark_func , _benchmark_line , time_ns = row
114114
115115 # Create the function key (module_name.class_name.function_name)
116116 if class_name :
@@ -172,7 +172,7 @@ def get_benchmark_timings(trace_path: Path) -> dict[BenchmarkKey, int]:
172172
173173 # Process overhead information
174174 for row in cursor .fetchall ():
175- benchmark_file , benchmark_func , benchmark_line , total_overhead_ns = row
175+ benchmark_file , benchmark_func , _benchmark_line , total_overhead_ns = row
176176 benchmark_key = BenchmarkKey (module_path = benchmark_file , function_name = benchmark_func )
177177 overhead_by_benchmark [benchmark_key ] = total_overhead_ns or 0 # Handle NULL sum case
178178
@@ -184,7 +184,7 @@ def get_benchmark_timings(trace_path: Path) -> dict[BenchmarkKey, int]:
184184
185185 # Process each row and subtract overhead
186186 for row in cursor .fetchall ():
187- benchmark_file , benchmark_func , benchmark_line , time_ns = row
187+ benchmark_file , benchmark_func , _benchmark_line , time_ns = row
188188
189189 # Create the benchmark key (file::function::line)
190190 benchmark_key = BenchmarkKey (module_path = benchmark_file , function_name = benchmark_func )
@@ -200,7 +200,7 @@ def get_benchmark_timings(trace_path: Path) -> dict[BenchmarkKey, int]:
200200
201201 # Pytest hooks
202202 @pytest .hookimpl
203- def pytest_sessionfinish (self , session , exitstatus ) -> None : # noqa: ANN001, ARG002
203+ def pytest_sessionfinish (self , session , exitstatus ) -> None : # noqa: ANN001
204204 """Execute after whole test run is completed."""
205205 # Write any remaining benchmark timings to the database
206206 codeflash_trace .close ()
@@ -218,7 +218,7 @@ def pytest_collection_modifyitems(config: pytest.Config, items: list[pytest.Item
218218 skip_no_benchmark = pytest .mark .skip (reason = "Test requires benchmark fixture" )
219219 for item in items :
220220 # Check for direct benchmark fixture usage
221- has_fixture = hasattr (item , "fixturenames" ) and "benchmark" in item .fixturenames
221+ has_fixture = hasattr (item , "fixturenames" ) and "benchmark" in item .fixturenames # ty:ignore[unsupported-operator]
222222
223223 # Check for @pytest.mark.benchmark marker
224224 has_marker = False
@@ -236,7 +236,7 @@ class Benchmark: # noqa: D106
236236 def __init__ (self , request : pytest .FixtureRequest ) -> None :
237237 self .request = request
238238
239- def __call__ (self , func , * args , ** kwargs ): # type: ignore # noqa: ANN001, ANN002, ANN003, ANN204, PGH003
239+ def __call__ (self , func , * args , ** kwargs ): # noqa: ANN001, ANN002, ANN003, ANN204
240240 """Handle both direct function calls and decorator usage."""
241241 if args or kwargs :
242242 # Used as benchmark(func, *args, **kwargs)
@@ -249,7 +249,7 @@ def wrapped_func(*args, **kwargs): # noqa: ANN002, ANN003, ANN202
249249 self ._run_benchmark (func )
250250 return wrapped_func
251251
252- def _run_benchmark (self , func , * args , ** kwargs ): # noqa: ANN001, ANN002, ANN003, ANN202
252+ def _run_benchmark (self , func , * args , ** kwargs ): # noqa: ANN002, ANN003, ANN202
253253 """Actual benchmark implementation."""
254254 node_path = getattr (self .request .node , "path" , None ) or getattr (self .request .node , "fspath" , None )
255255 if node_path is None :
0 commit comments