From e596fa7120c6ec30d5b43132f17de92bec47d58e Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Mon, 11 Nov 2024 01:52:23 -0600 Subject: [PATCH] feat(python): Improve `n_chunks` typing (#19727) --- py-polars/polars/dataframe/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index 4ff2752fdfb5..49c2e2470534 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -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.