Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions pandas-stubs/core/arrays/integer.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from pandas.core.arrays.masked import BaseMaskedArray

from pandas._libs.missing import NAType
from pandas._typing import (
AnyArrayLike,
np_ndarray,
)

from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype

Expand All @@ -16,8 +20,9 @@ class _IntegerDtype(ExtensionDtype):
class IntegerArray(BaseMaskedArray):
@property
def dtype(self) -> _IntegerDtype: ...
def __init__(self, values, mask, copy: bool = ...) -> None: ...
def __setitem__(self, key, value) -> None: ...
def __init__(
self, values: AnyArrayLike, mask: np_ndarray, copy: bool = False
) -> None: ...

class Int8Dtype(_IntegerDtype): ...
class Int16Dtype(_IntegerDtype): ...
Expand Down
16 changes: 10 additions & 6 deletions pandas-stubs/core/arrays/masked.pyi
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
from collections.abc import Iterator
from typing import (
Any,
overload,
)

from pandas.core.arrays import ExtensionArray as ExtensionArray
from pandas.core.series import Series
from typing_extensions import Self

from pandas._typing import (
DtypeArg,
NpDtype,
Scalar,
ScalarIndexer,
SequenceIndexer,
np_1darray,
np_ndarray_bool,
npt,
)

Expand All @@ -20,8 +24,8 @@ class BaseMaskedArray(ExtensionArray):
def __getitem__(self, item: ScalarIndexer) -> Any: ...
@overload
def __getitem__(self, item: SequenceIndexer) -> Self: ...
def __iter__(self): ...
def __invert__(self): ...
def __iter__(self) -> Iterator: ...
def __invert__(self) -> Self: ...
def to_numpy(
self,
dtype: npt.DTypeLike | None = ...,
Expand All @@ -32,9 +36,9 @@ class BaseMaskedArray(ExtensionArray):
def __array__(
self, dtype: NpDtype | None = None, copy: bool | None = None
) -> np_1darray: ...
def __arrow_array__(self, type=...): ...
def isna(self): ...
def __arrow_array__(self, type: DtypeArg | None = None) -> Any: ...
def copy(self) -> Self: ...
def value_counts(self, dropna: bool = True) -> Series: ...
def isna(self) -> np_ndarray_bool: ...
@property
def nbytes(self) -> int: ...
def copy(self): ...
def value_counts(self, dropna: bool = True): ...
18 changes: 13 additions & 5 deletions pandas-stubs/core/arrays/string_.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
from typing import Literal
from typing import (
Any,
Literal,
)

from pandas.core.arrays import PandasArray
from pandas.core.series import Series

from pandas._libs.missing import NAType
from pandas._typing import (
AnyArrayLike,
DtypeArg,
)

from pandas.core.dtypes.base import ExtensionDtype

Expand All @@ -12,7 +20,7 @@ class StringDtype(ExtensionDtype):
def na_value(self) -> NAType: ...

class StringArray(PandasArray):
def __init__(self, values, copy: bool = ...) -> None: ...
def __arrow_array__(self, type=...): ...
def __setitem__(self, key, value) -> None: ...
def value_counts(self, dropna: bool = True): ...
def __init__(self, values: AnyArrayLike, copy: bool = False) -> None: ...
def __arrow_array__(self, type: DtypeArg | None = None) -> Any: ...
def __setitem__(self, key: Any, value: str | None) -> None: ...
def value_counts(self, dropna: bool = True) -> Series[int]: ...
2 changes: 1 addition & 1 deletion pandas-stubs/io/excel/_base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class ExcelFile:
storage_options: StorageOptions = ...,
engine_kwargs: dict[str, Any] | None = ...,
) -> None: ...
def __fspath__(self): ...
def __fspath__(self) -> str: ...
@overload
def parse(
self,
Expand Down
31 changes: 28 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,39 @@ ignore = [
# TODO: remove when window is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*array*" = [
"*arrays/sparse/*" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*excel/_base.pyi" = [
# TODO: remove when excel/_base.pyi is fully typed
"*arrays/boolean.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*arrays/categorical.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*arrays/datetimelike.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*arrays/datetimes.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*arrays/interval.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*arrays/period.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]
"*arrays/timedeltas.pyi" = [
# TODO: remove when array is fully typed
"ANN001", "ANN201", "ANN204", "ANN206",
]

"scripts/*" = [
# The following rules are ignored permanently for good reasons
"EM", # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
Expand Down
Loading