8000 TYP: Bump mypy to 1.5.1 · Python-Repository-Hub/numpy@3c3b8d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c3b8d1

Browse files
committed
TYP: Bump mypy to 1.5.1
1 parent fb65dc5 commit 3c3b8d1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
- hypothesis
2727
# For type annotations
2828
- typing_extensions>=4.2.0 # needed for python < 3.10
29-
- mypy=1.4.1
29+
- mypy=1.5.1
3030
# For building docs
3131
- sphinx>=4.5.0
3232
- sphinx-design

numpy/typing/tests/data/fail/lib_polynomial.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ AR_U: npt.NDArray[np.str_]
88

99
poly_obj: np.poly1d
1010

11+
np.polymul(AR_f8, AR_U) # E: incompatible type
12+
np.polydiv(AR_f8, AR_U) # E: incompatible type
13+
14+
5**poly_obj # E: No overload variant
15+
1116
np.polyint(AR_U) # E: incompatible type
1217
np.polyint(AR_f8, m=1j) # E: No overload variant
1318

@@ -22,8 +27,3 @@ np.polyfit(AR_f8, AR_f8, 1, cov="bob") # E: No overload variant
2227
np.polyval(AR_f8, AR_U) # E: incompatible type
2328
np.polyadd(AR_f8, AR_U) # E: incompatible type
2429
np.polysub(AR_f8, AR_U) # E: incompatible type
25-
np.polymul(AR_f8, AR_U) # E: incompatible type
26-
np.polydiv(AR_f8, AR_U) # E: incompatible type
27-
28-
5**poly_obj # E: No overload variant
29-
hash(poly_obj)

numpy/typing/tests/data/reveal/arithmetic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ assert_type(i8 + AR_f, npt.NDArray[np.floating[Any]])
461461

462462
assert_type(u8 + u8, np.uint64)
463463
assert_type(u8 + i4, Any)
464-
assert_type(u8 + u4, np.signedinteger[_32Bit | _64Bit])
464+
assert_type(u8 + u4, np.unsignedinteger[_32Bit | _64Bit])
465465
assert_type(u8 + b_, np.uint64)
466466
assert_type(u8 + b, np.uint64)
467467
assert_type(u8 + c, np.complex128)

test_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cffi; python_version < '3.10'
1313
# For testing types. Notes on the restrictions:
1414
# - Mypy relies on C API features not present in PyPy
1515
# NOTE: Keep mypy in sync with environment.yml
16-
mypy==1.4.1; platform_python_implementation != "PyPy"
16+
mypy==1.5.1; platform_python_implementation != "PyPy"
1717
typing_extensions>=4.2.0
1818
# for optional f2py encoding detection
1919
charset-normalizer

0 commit comments

Comments
 (0)
0