Skip to content

Commit

Permalink
feat(python): Improve n_chunks typing (#19727)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-muoto authored Nov 11, 2024
1 parent 2c6bae1 commit e596fa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -9236,7 +9236,7 @@ def n_chunks(self, strategy: Literal["first"] = ...) -> int: ...
@overload
def n_chunks(self, strategy: Literal["all"]) -> list[int]: ...

def n_chunks(self, strategy: str = "first") -> int | list[int]:
def n_chunks(self, strategy: Literal["first", "all"] = "first") -> int | list[int]:
"""
Get number of chunks used by the ChunkedArrays of this DataFrame.
Expand Down

0 comments on commit e596fa7

Please sign in to comment.