diff --git a/python/pyarrow-stubs-tests/test_array.py b/python/pyarrow-stubs-tests/test_array.py index ab57edd3491..d64e4277907 100644 --- a/python/pyarrow-stubs-tests/test_array.py +++ b/python/pyarrow-stubs-tests/test_array.py @@ -291,7 +291,7 @@ def test_invalid_usage() -> None: arr.slice("1") # type: ignore[arg-type] arr.equals(object()) # type: ignore[arg-type] arr.equals(None) # type: ignore[arg-type] - arr.format() # type: ignore[attr-defined] # ty: ignore[unresolved-attribute] # noqa: E501 + arr.format() # type: ignore[attr-defined] # ty: ignore[missing-attribute] # noqa: E501 pa.Array.from_pandas(1) # type: ignore[arg-type] # Arrays define __eq__ but not __hash__, hence unhashable at runtime _: Hashable = arr # type: ignore[assignment] # ty: ignore[invalid-assignment] diff --git a/python/pyarrow-stubs/__lib/types.pyi b/python/pyarrow-stubs/__lib/types.pyi index fe4dc10abc2..7810d33b762 100644 --- a/python/pyarrow-stubs/__lib/types.pyi +++ b/python/pyarrow-stubs/__lib/types.pyi @@ -364,9 +364,9 @@ class KeyValueMetadata(_Metadata, Mapping[bytes, bytes]): def key(self, i: int) -> bytes: ... def value(self, i: int) -> bytes: ... # The runtime yields generators instead of Mapping views - def keys(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[invalid-method-override] # noqa: E501 - def values(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[invalid-method-override] # noqa: E501 - def items(self) -> Iterator[tuple[bytes, bytes]]: ... # type: ignore[override] # ty: ignore[invalid-method-override] # noqa: E501 + def keys(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[incompatible-method-override] # noqa: E501 + def values(self) -> Iterator[bytes]: ... # type: ignore[override] # ty: ignore[incompatible-method-override] # noqa: E501 + def items(self) -> Iterator[tuple[bytes, bytes]]: ... # type: ignore[override] # ty: ignore[incompatible-method-override] # noqa: E501 def get_all(self, key: str | bytes) -> list[bytes]: ... def to_dict(self) -> dict[bytes, bytes]: ... diff --git a/python/pyproject.toml b/python/pyproject.toml index 04b7e36a906..b404c261f32 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -169,7 +169,7 @@ include = ["pyarrow-stubs", "pyarrow-stubs-tests"] include = ["pyarrow-stubs/__lib/array.pyi"] [tool.ty.overrides.rules] # Some array classes override methods with a different signature at runtime. -invalid-method-override = "ignore" +incompatible-method-override = "ignore" [[tool.ty.overrides]] include = ["pyarrow-stubs-tests/**"] diff --git a/python/requirements-stubs.txt b/python/requirements-stubs.txt index f8fb91f9850..ffda1001c33 100644 --- a/python/requirements-stubs.txt +++ b/python/requirements-stubs.txt @@ -7,16 +7,16 @@ fsspec==2026.9.0 # NumPy's annotations change between releases, which changes the results of # the type checkers. numpy==2.4.6 -mypy==2.4.0 -pandas-stubs==3.0.5.260914 +mypy==2.4.1 +pandas-stubs==3.1.0.261029 pyright==1.1.414 # The scipy extra installs the matching scipy, which the type stub tests import. scipy-stubs[scipy]==1.17.1.5 -ty==0.0.99 -types-cffi==2.1.0.20260827 -types-psutil==7.2.2.20260906 -types-python-dateutil==2.9.0.20261021 -types-requests==2.33.0.20261006 +ty==0.0.107 +types-cffi==2.1.0.20261122 +types-psutil==7.2.2.20261122 +types-python-dateutil==2.9.0.20261122 +types-requests==2.33.0.20261030 # Annotated dependencies of the type stub tests, usually installed already. pytest -typing_extensions>=4.12.0 +typing_extensions>=4.16.0