8000 TYP,TST: Fix failing type-tests caused by a mypy 1.11 bug · numpy/numpy@9211e27 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9211e27

Browse files
committed
TYP,TST: Fix failing type-tests caused by a mypy 1.11 bug
1 parent 4fb81e2 commit 9211e27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

numpy/typing/tests/data/pass/literal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
(KACF, AR.flatten),
2424
(KACF, AR.ravel),
2525
(KACF, partial(np.array, 1)),
26-
(CF, partial(np.zeros, 1)),
27-
(CF, partial(np.ones, 1)),
28-
(CF, partial(np.empty, 1)),
26+
# NOTE: __call__ is needed due to mypy 1.11 bugs (#17620, #17631)
27+
(CF, partial(np.zeros.__call__, 1)),
28+
(CF, partial(np.ones.__call__, 1)),
29+
(CF, partial(np.empty.__call__, 1)),
2930
(CF, partial(np.full, 1, 1)),
3031
(KACF, partial(np.zeros_like, AR)),
3132
(KACF, partial(np.ones_like, AR)),
3233
(KACF, partial(np.empty_like, AR)),
3334
(KACF, partial(np.full_like, AR, 1)),
34-
# __call__ is needed due to mypy 1.11 bugs (#17620, #17631)
3535
(KACF, partial(np.add.__call__, 1, 1)), # i.e. np.ufunc.__call__
3636
(ACF, partial(np.reshape, AR, 1)),
3737
(KACF, partial(np.ravel, AR)),

0 commit comments

Comments
 (0)
0