From b5ec69f60834df676c10294cda7623fbe62cb54d Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Tue, 2 Jul 2024 01:33:31 -0500 Subject: [PATCH] Add missing `strict` argument for `itertools.batched` (3.13) (#12256) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> --- stdlib/itertools.pyi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stdlib/itertools.pyi b/stdlib/itertools.pyi index 16e04829c6cf..1635b6a0a072 100644 --- a/stdlib/itertools.pyi +++ b/stdlib/itertools.pyi @@ -326,6 +326,10 @@ if sys.version_info >= (3, 10): if sys.version_info >= (3, 12): class batched(Iterator[tuple[_T_co, ...]], Generic[_T_co]): - def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ... + if sys.version_info >= (3, 13): + def __new__(cls, iterable: Iterable[_T_co], n: int, *, strict: bool = False) -> Self: ... + else: + def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ... + def __iter__(self) -> Self: ... def __next__(self) -> tuple[_T_co, ...]: ...