mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Add/update type: ignore
for new mypy version.
This commit is contained in:
parent
32a4128586
commit
8532780526
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user