Skip to content

Commit f3dd2e1

Browse files
committed
TYP,TST: Fix failing type-tests caused by a mypy 1.11 bug
1 parent e10d612 commit f3dd2e1

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
@@ -25,15 +25,15 @@
2525
(KACF, AR.flatten),
2626
(KACF, AR.ravel),
2727
(KACF, partial(np.array, 1)),
28-
(CF, partial(np.zeros, 1)),
29-
(CF, partial(np.ones, 1)),
30-
(CF, partial(np.empty, 1)),
28+
# NOTE: __call__ is needed due to mypy 1.11 bugs (#17620, #17631)
29+
(CF, partial(np.zeros.__call__, 1)),
30+
(CF, partial(np.ones.__call__, 1)),
31+
(CF, partial(np.empty.__call__, 1)),
3132
(CF, partial(np.full, 1, 1)),
3233
(KACF, partial(np.zeros_like, AR)),
3334
(KACF, partial(np.ones_like, AR)),
3435
(KACF, partial(np.empty_like, AR)),
3536
(KACF, partial(np.full_like, AR, 1)),
36-
# __call__ is needed due to mypy 1.11 bugs (#17620, #17631)
3737
(KACF, partial(np.add.__call__, 1, 1)), # i.e. np.ufunc.__call__
3838
(ACF, partial(np.reshape, AR, 1)),
3939
(KACF, partial(np.ravel, AR)),

0 commit comments

Comments
 (0)