Skip to content

Commit 8532780

Browse files
committed
Add/update type: ignore for new mypy version.
1 parent 32a4128 commit 8532780

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ubench/holder_comparison.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import time
66
from typing import Any, Callable, Dict, List
77

8-
import pybind11_ubench_holder_comparison as m # type: ignore
8+
import pybind11_ubench_holder_comparison as m # type: ignore[import]
99

1010
number_bucket_pc = None
1111

@@ -89,8 +89,8 @@ def find_call_repetitions(
8989
continue
9090
if selected_holder_type != "all" and nb_label != selected_holder_type:
9191
continue
92-
nb1 = nb_type(data_size) # type: ignore
93-
nb2 = nb_type(data_size) # type: ignore
92+
nb1 = nb_type(data_size) # type: ignore[misc]
93+
nb2 = nb_type(data_size) # type: ignore[misc]
9494

9595
def many_sum(call_repetitions: int) -> float:
9696
assert int(round(nb1.sum())) == data_size
@@ -117,7 +117,7 @@ def many_add(call_repetitions: int) -> float:
117117
pflush(" Sum Add ratS ratA")
118118
row_0 = row
119119
else:
120-
for curr, prev in zip(row, row_0):
120+
for curr, prev in zip(row, row_0): # type: ignore[unreachable]
121121
if prev:
122122
rat = curr / prev
123123
else:

ubench/holder_comparison_extract_sheet_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ def run(args: List[str]) -> None:
1919

2020
def show() -> Optional[List[str]]:
2121
if header_row:
22-
if header is None:
22+
if header is None: # type: ignore[unreachable]
2323
print(",".join(header_row))
2424
else:
2525
assert header == header_row
2626
if data_row is not None:
27-
print(",".join(data_row))
27+
print(",".join(data_row)) # type: ignore[unreachable]
2828
data_row_buffer.append(data_row)
2929
return header_row
3030

0 commit comments

Comments
 (0)