Add/update type: ignore for new mypy version.

This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-04-12 16:13:14 -07:00
parent 32a4128586
commit 8532780526
2 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ import sys
import time
from typing import Any, Callable, Dict, List
import pybind11_ubench_holder_comparison as m # type: ignore
import pybind11_ubench_holder_comparison as m # type: ignore[import]
number_bucket_pc = None
@ -89,8 +89,8 @@ def run(args: List[str]) -> None:
continue
if selected_holder_type != "all" and nb_label != selected_holder_type:
continue
nb1 = nb_type(data_size) # type: ignore
nb2 = nb_type(data_size) # type: ignore
nb1 = nb_type(data_size) # type: ignore[misc]
nb2 = nb_type(data_size) # type: ignore[misc]
def many_sum(call_repetitions: int) -> float:
assert int(round(nb1.sum())) == data_size
@ -117,7 +117,7 @@ def run(args: List[str]) -> None:
pflush(" Sum Add ratS ratA")
row_0 = row
else:
for curr, prev in zip(row, row_0):
for curr, prev in zip(row, row_0): # type: ignore[unreachable]
if prev:
rat = curr / prev
else:

View File

@ -19,12 +19,12 @@ def run(args: List[str]) -> None:
def show() -> Optional[List[str]]:
if header_row:
if header is None:
if header is None: # type: ignore[unreachable]
print(",".join(header_row))
else:
assert header == header_row
if data_row is not None:
print(",".join(data_row))
print(",".join(data_row)) # type: ignore[unreachable]
data_row_buffer.append(data_row)
return header_row