Skip to content

Commit 4b40cf5

Browse files
committed
🐴 work around some useless mypy errors
1 parent 43ec89c commit 4b40cf5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tool/testgen.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ def __init_dtypes(self) -> None:
11671167
continue
11681168
seen_dtypes.add(label)
11691169

1170-
kind = dtype.kind
1170+
kind: str = dtype.kind
11711171
if kind in "SU":
11721172
kind = "w"
11731173
if kind in unseen_abstract and label in unseen_abstract[kind]:
@@ -1209,10 +1209,12 @@ def _evaluate(
12091209
lhs, rhs = rhs, lhs
12101210

12111211
try:
1212-
return self.opfunc(lhs, rhs).dtype
1212+
dtype: np.dtype = self.opfunc(lhs, rhs).dtype
12131213
except TypeError:
12141214
return None
12151215

1216+
return dtype
1217+
12161218
def _gen_testcases_np_nd(self, label1: str, /) -> Generator[str | None]:
12171219
name1 = f"{label1}_nd"
12181220
dtypes1 = self.dtypes[label1]

0 commit comments

Comments
 (0)