Skip to content

Commit 3df344a

Browse files
committed
pyrefly
1 parent 809efc1 commit 3df344a

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

pandas-stubs/_typing.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,7 @@ Incomplete: TypeAlias = Any
11141114
class Just(Protocol, Generic[T]):
11151115
@property # type: ignore[override]
11161116
@override
1117-
# pyrefly: ignore # bad-override
1118-
def __class__(self, /) -> type[T]: ...
1117+
def __class__(self, /) -> type[T]: ... # pyrefly: ignore[bad-override]
11191118
@__class__.setter
11201119
@override
11211120
def __class__(self, t: type[T], /) -> None: ...

pandas-stubs/core/indexes/range.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ class RangeIndex(_IndexSubclassBase[int, np.int64]):
6969
def all(self, *args: Any, **kwargs: Any) -> bool: ...
7070
def any(self, *args: Any, **kwargs: Any) -> bool: ...
7171
@overload # type: ignore[override]
72-
def union(
72+
def union( # pyrefly: ignore[bad-override]
7373
self, other: Sequence[int] | Index[int] | Self, sort: bool | None = None
7474
) -> Index[int] | Self: ...
7575
@overload
7676
def union(
7777
self, other: Sequence[HashableT] | Index, sort: bool | None = None
7878
) -> Index: ...
79-
@overload # type: ignore[override] # pyrefly: ignore[bad-override]
80-
def __getitem__(
79+
@overload # type: ignore[override]
80+
def __getitem__( # pyrefly: ignore[bad-override]
8181
self,
8282
idx: slice | np_ndarray_anyint | Sequence[int] | Index | MaskType,
8383
) -> Index: ...

pandas-stubs/core/series.pyi

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,16 +2966,14 @@ class Series(IndexOpsMixin[S1], ElementOpsMixin[S1], NDFrame):
29662966
def __pow__(self, other: num | ListLike | Series[S1]) -> Series[S1]: ...
29672967
# ignore needed for mypy as we want different results based on the arguments
29682968
@overload # type: ignore[override]
2969-
# pyrefly: ignore # bad-override
2970-
def __or__( # pyright: ignore[reportOverlappingOverload]
2969+
def __or__( # pyright: ignore[reportOverlappingOverload] # pyrefly: ignore[bad-override]
29712970
self, other: bool | list[int] | MaskType
29722971
) -> Series[bool]: ...
29732972
@overload
29742973
def __or__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
29752974
# ignore needed for mypy as we want different results based on the arguments
29762975
@overload # type: ignore[override]
2977-
# pyrefly: ignore # bad-override
2978-
def __rand__( # pyright: ignore[reportOverlappingOverload]
2976+
def __rand__( # pyright: ignore[reportOverlappingOverload] # pyrefly: ignore[bad-override]
29792977
self, other: bool | MaskType | list[int]
29802978
) -> Series[bool]: ...
29812979
@overload
@@ -2985,16 +2983,14 @@ class Series(IndexOpsMixin[S1], ElementOpsMixin[S1], NDFrame):
29852983
def __rpow__(self, other: num | ListLike | Series[S1]) -> Series[S1]: ...
29862984
# ignore needed for mypy as we want different results based on the arguments
29872985
@overload # type: ignore[override]
2988-
# pyrefly: ignore # bad-override
2989-
def __ror__( # pyright: ignore[reportOverlappingOverload]
2986+
def __ror__( # pyright: ignore[reportOverlappingOverload] # pyrefly: ignore[bad-override]
29902987
self, other: bool | MaskType | list[int]
29912988
) -> Series[bool]: ...
29922989
@overload
29932990
def __ror__(self, other: int | np_ndarray_anyint | Series[int]) -> Series[int]: ...
29942991
# ignore needed for mypy as we want different results based on the arguments
29952992
@overload # type: ignore[override]
2996-
# pyrefly: ignore # bad-override
2997-
def __rxor__( # pyright: ignore[reportOverlappingOverload]
2993+
def __rxor__( # pyright: ignore[reportOverlappingOverload] # pyrefly: ignore[bad-override]
29982994
self, other: bool | MaskType | list[int]
29992995
) -> Series[bool]: ...
30002996
@overload
@@ -4140,8 +4136,7 @@ class Series(IndexOpsMixin[S1], ElementOpsMixin[S1], NDFrame):
41404136
rdiv = rtruediv
41414137
# ignore needed for mypy as we want different results based on the arguments
41424138
@overload # type: ignore[override]
4143-
# pyrefly: ignore # bad-override
4144-
def __xor__( # pyright: ignore[reportOverlappingOverload]
4139+
def __xor__( # pyright: ignore[reportOverlappingOverload] # pyrefly: ignore[bad-override]
41454140
self, other: bool | MaskType | list[int]
41464141
) -> Series[bool]: ...
41474142
@overload

tests/indexes/test_indexes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def test_range_index_union() -> None:
277277
pd.RangeIndex(0, 10).union([11, 12, 13]), "pd.Index[int] | pd.RangeIndex"
278278
),
279279
pd.Index,
280-
int,
280+
np.integer,
281281
)
282282
check(assert_type(pd.RangeIndex(0, 10).union(["a", "b", "c"]), pd.Index), pd.Index)
283283

0 commit comments

Comments
 (0)