Skip to content

Commit

Permalink
fix(python): Fix DataFrame.n_chunks return type (#5650)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Nov 28, 2022
1 parent 8497f95 commit 908a4c7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions py-polars/polars/internals/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5606,17 +5606,13 @@ def with_columns(
)

@overload
def n_chunks(self, strategy: Literal["first"]) -> int:
def n_chunks(self, strategy: Literal["first"] = ...) -> int:
...

@overload
def n_chunks(self, strategy: Literal["all"]) -> list[int]:
...

@overload
def n_chunks(self, strategy: str = "first") -> int | list[int]:
...

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

0 comments on commit 908a4c7

Please sign in to comment.