Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["uv_build>=0.9.14,<0.10.0"]
requires = ["uv_build>=0.9.17,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
Expand All @@ -9,7 +9,7 @@ source-exclude = ['\@test', ".ruff_cache", ".ruff.toml"]

[project]
name = "numtype"
version = "2.3.5.0.dev0"
version = "2.4.0.0.dev0"
description = "Experimental Typing Stubs for NumPy"
readme = "README.md"
authors = [{ name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com" }]
Expand All @@ -34,7 +34,7 @@ requires-python = ">=3.11"
dependencies = []

[project.optional-dependencies]
numpy = ["numpy>=2.3.5"]
numpy = ["numpy>=2.4.0rc1"]

[project.urls]
Homepage = "https://numpy.org/"
Expand All @@ -46,11 +46,11 @@ Changelog = "https://github.com/numpy/numtype/releases"
numpy = ["numtype[numpy]"]
lint = [
"dprint-py>=0.50.2.0",
"ruff>=0.14.7",
"ruff>=0.14.9",
]
pytest = [
{ include-group = "numpy" },
"pytest>=9.0.1",
"pytest>=9.0.2",
"typing_extensions>=4.15.0",
]
list_and_test = [
Expand All @@ -65,7 +65,7 @@ types = [
basedpyright = [
{ include-group = "numpy" },
{ include-group = "types" },
"basedpyright==1.35.0",
"basedpyright==1.36.1",
]
mypy = [
{ include-group = "types" },
Expand All @@ -77,7 +77,7 @@ typecheck = [
]
docs = [
"mkdocs-material>=9.7.0",
"mkdocs-awesome-nav>=3.2.0",
"mkdocs-awesome-nav>=3.3.0",
"markdown-callouts>=0.4.0",
"mkdocs-include-markdown-plugin>=7.2.0",
"mkdocs-minify-plugin>=0.8.0",
Expand Down
18 changes: 5 additions & 13 deletions src/numpy-stubs/@test/runtime/legacy/ufunclike.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
from __future__ import annotations

from typing import Any
from typing import Any, Self

import numpy as np
import numpy.typing as npt


class Object:
def __ceil__(self) -> Object:
return self

def __floor__(self) -> Object:
def __trunc__(self, /) -> Self:
return self

def __ge__(self, value: object) -> bool:
def __ge__(self, other: object, /) -> bool:
return True

def __array__(
self, dtype: npt.DTypeLike | None = None, *, copy: bool | None = None
) -> np.ndarray[Any, np.dtype[np.object_]]:
def __array__(self, /) -> np.ndarray[Any, np.dtype[np.object_]]:
ret = np.empty((), dtype=object)
ret[()] = self
return ret
Expand All @@ -29,7 +21,7 @@ def __array__(
AR_LIKE_i = [1, 2, 3]
AR_LIKE_f = [1.0, 2.0, 3.0]
AR_LIKE_O = [Object(), Object(), Object()]
AR_U: np.ndarray[Any, np.dtype[np.str_]] = np.zeros(3, dtype="U5")
AR_U: np.ndarray[tuple[int], np.dtype[np.str_]] = np.zeros(3, dtype="U5")

np.fix(AR_LIKE_b)
np.fix(AR_LIKE_u)
Expand Down
2 changes: 1 addition & 1 deletion src/numtype/@test/test_numtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def test_reexport(name: str) -> None:


def test_version() -> None:
assert nt.__version__.startswith(np.__version__)
assert nt.__version__.startswith(np.__version__.split("rc")[0])
Loading