8000 TST, TYP: Workaround a mypy 1.11 bug with ``functools.partial`` in th… · numpy/numpy@be116b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit be116b0

Browse files
committed
TST, TYP: Workaround a mypy 1.11 bug with functools.partial in the tests
1 parent fd6fa45 commit be116b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
(KACF, partial(np.ones_like, AR)),
3232
(KACF, partial(np.empty_like, AR)),
3333
(KACF, partial(np.full_like, AR, 1)),
34-
(KACF, partial(np.add, 1, 1)), # i.e. np.ufunc.__call__
34+
# __call__ is needed due to mypy 1.11 bugs (#17620, #17631)
35+
(KACF, partial(np.add.__call__, 1, 1)), # i.e. np.ufunc.__call__
3536
(ACF, partial(np.reshape, AR, 1)),
3637
(KACF, partial(np.ravel, AR)),
3738
(KACF, partial(np.asarray, 1)),

0 commit comments

Comments
 (0)
0