Skip to content

Commit 42521cb

Browse files
committed
🐓 work around mypy's limited support for Final attributes
1 parent bc4233d commit 42521cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ā€Žtool/testgen.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,12 +1097,12 @@ class NDArrayOps(TestGen):
10971097
testname = "ndarray_{}"
10981098
numpy_imports_extra = ("import numpy.typing as npt",)
10991099

1100-
opname: Final[_OpName]
1101-
opfunc: Final[Callable[..., Any]]
1102-
n_in: Final[Literal[1, 2]]
1103-
n_out: Final[Literal[1, 2]]
1100+
opname: _OpName
1101+
opfunc: Callable[..., Any]
1102+
n_in: Literal[1, 2]
1103+
n_out: Literal[1, 2]
11041104

1105-
dtypes: Final[dict[str, tuple[np.dtype, ...]]]
1105+
dtypes: dict[str, tuple[np.dtype, ...]]
11061106

11071107
def __init__(self, opname: _OpName, /) -> None:
11081108
ufunc = OP_UFUNCS[opname]

0 commit comments

Comments
Ā (0)