Skip to content

Commit

Permalink
change the order of getitem str and Sequence[str]
Browse files Browse the repository at this point in the history
  • Loading branch information
raisadz committed Sep 9, 2024
1 parent 6653789 commit 27966d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions narwhals/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,10 @@ def __getitem__(self, item: tuple[Sequence[int], int]) -> Series: ... # type: i
def __getitem__(self, item: Sequence[int]) -> Self: ...

@overload
def __getitem__(self, item: Sequence[str]) -> Self: ...
def __getitem__(self, item: str) -> Series: ... # type: ignore[overload-overlap]

@overload
def __getitem__(self, item: str) -> Series: ... # type: ignore[misc]
def __getitem__(self, item: Sequence[str]) -> Self: ...

@overload
def __getitem__(self, item: slice) -> Self: ...
Expand Down
4 changes: 2 additions & 2 deletions narwhals/stable/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def __getitem__(self, item: tuple[Sequence[int], int]) -> Series: ... # type: i
@overload
def __getitem__(self, item: Sequence[int]) -> Self: ...
@overload
def __getitem__(self, item: Sequence[str]) -> Self: ...
def __getitem__(self, item: str) -> Series: ... # type: ignore[overload-overlap]
@overload
def __getitem__(self, item: str) -> Series: ... # type: ignore[misc]
def __getitem__(self, item: Sequence[str]) -> Self: ...

@overload
def __getitem__(self, item: slice) -> Self: ...
Expand Down

0 comments on commit 27966d9

Please sign in to comment.