diff --git a/pandas-stubs/_typing.pyi b/pandas-stubs/_typing.pyi index 2855d822..d8f655b5 100644 --- a/pandas-stubs/_typing.pyi +++ b/pandas-stubs/_typing.pyi @@ -437,7 +437,7 @@ class SequenceNotStr(Protocol[_T_co]): def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, /, start: int = 0, stop: int = ...) -> int: ... + def index(self, value: Any, start: int = ..., stop: int = ..., /) -> int: ... def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... diff --git a/pandas-stubs/core/frame.pyi b/pandas-stubs/core/frame.pyi index 5231b976..ff34e31a 100644 --- a/pandas-stubs/core/frame.pyi +++ b/pandas-stubs/core/frame.pyi @@ -174,7 +174,7 @@ class _LocIndexerFrame(_LocIndexer): ], ) -> DataFrame: ... @overload - def __getitem__( + def __getitem__( # pyright: ignore[reportOverlappingOverload] self, idx: tuple[ int | StrLike | tuple[Scalar, ...] | Callable[[DataFrame], ScalarT], @@ -556,7 +556,7 @@ class DataFrame(NDFrame, OpsMixin): def T(self) -> DataFrame: ... def __getattr__(self, name: str) -> Series: ... @overload - def __getitem__(self, key: Scalar | tuple[Hashable, ...]) -> Series: ... # type: ignore[overload-overlap] + def __getitem__(self, key: Scalar | tuple[Hashable, ...]) -> Series: ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] @overload def __getitem__(self, key: Iterable[Hashable] | slice) -> DataFrame: ... @overload diff --git a/pandas-stubs/core/indexes/interval.pyi b/pandas-stubs/core/indexes/interval.pyi index 05df7908..305cf106 100644 --- a/pandas-stubs/core/indexes/interval.pyi +++ b/pandas-stubs/core/indexes/interval.pyi @@ -79,7 +79,7 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin): ) -> IntervalIndex[IntervalT]: ... @overload @classmethod - def from_breaks( + def from_breaks( # pyright: ignore[reportOverlappingOverload] cls, breaks: _EdgesInt, closed: IntervalClosedType = ..., @@ -119,7 +119,7 @@ class IntervalIndex(ExtensionIndex[IntervalT], IntervalMixin): ) -> IntervalIndex[Interval[pd.Timedelta]]: ... @overload @classmethod - def from_arrays( + def from_arrays( # pyright: ignore[reportOverlappingOverload] cls, left: _EdgesInt, right: _EdgesInt, diff --git a/pandas-stubs/core/reshape/tile.pyi b/pandas-stubs/core/reshape/tile.pyi index 6b163888..778ff58d 100644 --- a/pandas-stubs/core/reshape/tile.pyi +++ b/pandas-stubs/core/reshape/tile.pyi @@ -50,7 +50,7 @@ def cut( ordered: bool = ..., ) -> tuple[npt.NDArray[np.intp], IntervalIndex[IntervalT]]: ... @overload -def cut( # type: ignore[overload-overlap] +def cut( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] x: TimestampSeries, bins: int | TimestampSeries diff --git a/pandas-stubs/core/series.pyi b/pandas-stubs/core/series.pyi index b720291f..3f16abef 100644 --- a/pandas-stubs/core/series.pyi +++ b/pandas-stubs/core/series.pyi @@ -179,7 +179,7 @@ class _LocIndexerSeries(_LocIndexer, Generic[S1]): # ignore needed because of mypy. Overlapping, but we want to distinguish # having a tuple of just scalars, versus tuples that include slices or Index @overload - def __getitem__( # type: ignore[overload-overlap] + def __getitem__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, idx: Scalar | tuple[Scalar, ...], # tuple case is for getting a specific element when using a MultiIndex @@ -1465,7 +1465,7 @@ class Series(IndexOpsMixin[S1], NDFrame): ) -> Series: ... # ignore needed for mypy as we want different results based on the arguments @overload # type: ignore[override] - def __and__( # type: ignore[overload-overlap] + def __and__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool] ) -> Series[bool]: ... @overload @@ -1499,7 +1499,7 @@ class Series(IndexOpsMixin[S1], NDFrame): def __pow__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... # ignore needed for mypy as we want different results based on the arguments @overload # type: ignore[override] - def __or__( # type: ignore[overload-overlap] + def __or__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool] ) -> Series[bool]: ... @overload @@ -1512,7 +1512,7 @@ class Series(IndexOpsMixin[S1], NDFrame): def __radd__(self, other: num | _str | _ListLike | Series) -> Series: ... # ignore needed for mypy as we want different results based on the arguments @overload # type: ignore[override] - def __rand__( # type: ignore[overload-overlap] + def __rand__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool] ) -> Series[bool]: ... @overload @@ -1526,7 +1526,7 @@ class Series(IndexOpsMixin[S1], NDFrame): def __rpow__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ... # ignore needed for mypy as we want different results based on the arguments @overload # type: ignore[override] - def __ror__( # type: ignore[overload-overlap] + def __ror__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool] ) -> Series[bool]: ... @overload @@ -1535,7 +1535,7 @@ class Series(IndexOpsMixin[S1], NDFrame): def __rtruediv__(self, other: num | _ListLike | Series[S1]) -> Series: ... # ignore needed for mypy as we want different results based on the arguments @overload # type: ignore[override] - def __rxor__( # type: ignore[overload-overlap] + def __rxor__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool] ) -> Series[bool]: ... @overload @@ -1559,7 +1559,7 @@ class Series(IndexOpsMixin[S1], NDFrame): def __truediv__(self, other: num | _ListLike | Series[S1]) -> Series: ... # ignore needed for mypy as we want different results based on the arguments @overload # type: ignore[override] - def __xor__( # type: ignore[overload-overlap] + def __xor__( # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] self, other: bool | list[bool] | list[int] | np_ndarray_bool | Series[bool] ) -> Series[bool]: ... @overload diff --git a/pyproject.toml b/pyproject.toml index 4b213062..e44933ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ mypy = "1.8.0" pandas = "2.1.4" pyarrow = ">=10.0.1" pytest = ">=7.1.2" -pyright = ">=1.1.343" +pyright = ">=1.1.344" poethepoet = ">=0.16.5" loguru = ">=0.6.0" typing-extensions = ">=4.4.0" @@ -208,4 +208,3 @@ filterwarnings = [ # Next line needed to avoid poetry complaint [tool.setuptools_scm] -