aboutsummaryrefslogtreecommitdiff
path: root/tools/cru-py/cru/_iter.py
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-11-11 01:12:29 +0800
committerYuqian Yang <crupest@crupest.life>2024-12-27 16:16:29 +0800
commit7e9fdc36310d1bc63af4f4a0fc2f4963ae0154aa (patch)
tree32e9cdd3c2072ad16e9e1b68c8e4c252fa2749ed /tools/cru-py/cru/_iter.py
parentb834953fa61d816b9a955640ad12d244316ce904 (diff)
downloadcrupest-7e9fdc36310d1bc63af4f4a0fc2f4963ae0154aa.tar.gz
crupest-7e9fdc36310d1bc63af4f4a0fc2f4963ae0154aa.tar.bz2
crupest-7e9fdc36310d1bc63af4f4a0fc2f4963ae0154aa.zip
HALF WORK: 2024.12.27
Diffstat (limited to 'tools/cru-py/cru/_iter.py')
-rw-r--r--tools/cru-py/cru/_iter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/cru-py/cru/_iter.py b/tools/cru-py/cru/_iter.py
index 12d1d1f..5d3766a 100644
--- a/tools/cru-py/cru/_iter.py
+++ b/tools/cru-py/cru/_iter.py
@@ -415,8 +415,8 @@ class CruIterator(Generic[_T]):
return self.first_n(1).single_or(fallback)
@_wrap
- def flatten(self) -> Iterable[_T | Iterable[_T]]:
- return _Generic.iterable_flatten(self)
+ def flatten(self, max_depth: int = -1) -> Iterable[Any]:
+ return _Generic.iterable_flatten(self, max_depth)
def select_by_indices(self, indices: Iterable[int]) -> CruIterator[_T]:
index_set = set(indices)