Skip to content

Commit 6ffca51

Browse files
authored
Merge pull request #845 from numpy/bump-deps
2 parents bea3b0d + 690c8bb commit 6ffca51

File tree

6 files changed

+416
-432
lines changed

6 files changed

+416
-432
lines changed

docs/user/differences.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ from typing import TypeVar
5353

5454
NT = TypeVar("NT", bound=npt.NBitBase)
5555

56+
5657
def f(x: np.floating[NT]) -> np.floating[NT]: ...
5758
```
5859

@@ -68,6 +69,7 @@ def f(x: np.floating[NT]) -> np.floating[NT]: ...
6869
import numpy as np
6970
import numpy.typing as npt
7071

72+
7173
def f[NT: npt.NBitBase](x: np.floating[NT]) -> np.floating[NT]: ...
7274
```
7375

@@ -87,6 +89,7 @@ from typing import TypeVar
8789

8890
FloatT = TypeVar("FloatT", bound=np.floating)
8991

92+
9093
def f(x: FloatT) -> FloatT: ...
9194
```
9295

@@ -101,6 +104,7 @@ def f(x: FloatT) -> FloatT: ...
101104
```py
102105
import numpy as np
103106

107+
104108
def f[FloatT: np.floating](x: FloatT) -> FloatT: ...
105109
```
106110

@@ -123,6 +127,7 @@ from typing import TypeVar
123127

124128
NT = TypeVar("NT", bound=npt.NBitBase)
125129

130+
126131
def f(x: np.complexfloating[NT]) -> np.floating[NT]: ...
127132
```
128133

@@ -136,6 +141,7 @@ def f(x: np.complexfloating[NT]) -> np.floating[NT]: ...
136141
import numpy as np
137142
import numpy.typing as npt
138143

144+
139145
def f[NT: npt.NBitBase](x: np.complexfloating[NT]) -> np.floating[NT]: ...
140146
```
141147

@@ -150,6 +156,7 @@ In that case, you can rewrite it by using
150156
import numpy as np
151157
from typing import overload
152158

159+
153160
@overload
154161
def f(x: np.complex64) -> np.float32: ...
155162
@overload
@@ -205,9 +212,11 @@ the following type-unsafe code:
205212
```py
206213
import numpy as np
207214

215+
208216
def half(a: np.number) -> np.number:
209217
return a // 2
210218

219+
211220
half(np.complex128(1j)) # accepted
212221
```
213222

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Changelog = "https://github.com/numpy/numtype/releases"
4545
[dependency-groups]
4646
numpy = ["numtype[numpy]"]
4747
lint = [
48-
"dprint-py>=0.51.1.0",
49-
"ruff>=0.15.1",
48+
"dprint-py>=0.52.0.0",
49+
"ruff>=0.15.5",
5050
]
5151
pytest = [
5252
{ include-group = "numpy" },
@@ -60,7 +60,7 @@ list_and_test = [
6060
types = [
6161
{ include-group = "pytest" },
6262
"types-setuptools>=82.0.0.20260210",
63-
"types-tabulate>=0.9.0.20241207",
63+
"types-tabulate>=0.10.0.20260308",
6464
]
6565
basedpyright = [
6666
{ include-group = "numpy" },
@@ -76,7 +76,7 @@ typecheck = [
7676
{ include-group = "mypy" },
7777
]
7878
docs = [
79-
"mkdocs-material>=9.7.1",
79+
"mkdocs-material>=9.7.4",
8080
"mkdocs-awesome-nav>=3.3.0",
8181
"markdown-callouts>=0.4.0",
8282
"mkdocs-include-markdown-plugin>=7.2.1",

src/numpy-stubs/_core/_multiarray_umath.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# ruff: noqa: F811
21
import _contextvars
32
import datetime as dt
43
from _typeshed import Incomplete, StrOrBytesPath, SupportsLenAndGetItem

0 commit comments

Comments
 (0)