aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/more-itertools/py3/more_itertools
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-09-23 09:24:31 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-09-23 09:32:38 +0300
commitb67425f20085aece54ebc6d2e01f7b1d51264367 (patch)
tree028e85eebd5ca15532a7c8af1be47ffe7c5a01c2 /contrib/python/more-itertools/py3/more_itertools
parentf34ba1c37947f7fd09686770648a20f733d58bf1 (diff)
downloadydb-b67425f20085aece54ebc6d2e01f7b1d51264367.tar.gz
Intermediate changes
commit_hash:51da31b953af59da417fd34f6497294c54fae317
Diffstat (limited to 'contrib/python/more-itertools/py3/more_itertools')
-rw-r--r--contrib/python/more-itertools/py3/more_itertools/__init__.py2
-rw-r--r--contrib/python/more-itertools/py3/more_itertools/more.py2
-rw-r--r--contrib/python/more-itertools/py3/more_itertools/more.pyi6
-rw-r--r--contrib/python/more-itertools/py3/more_itertools/recipes.py7
4 files changed, 11 insertions, 6 deletions
diff --git a/contrib/python/more-itertools/py3/more_itertools/__init__.py b/contrib/python/more-itertools/py3/more_itertools/__init__.py
index 2e2fcbbe7b..583fb57457 100644
--- a/contrib/python/more-itertools/py3/more_itertools/__init__.py
+++ b/contrib/python/more-itertools/py3/more_itertools/__init__.py
@@ -3,4 +3,4 @@
from .more import * # noqa
from .recipes import * # noqa
-__version__ = '10.4.0'
+__version__ = '10.5.0'
diff --git a/contrib/python/more-itertools/py3/more_itertools/more.py b/contrib/python/more-itertools/py3/more_itertools/more.py
index 3bf2c76b76..64fab26185 100644
--- a/contrib/python/more-itertools/py3/more_itertools/more.py
+++ b/contrib/python/more-itertools/py3/more_itertools/more.py
@@ -3017,7 +3017,7 @@ def circular_shifts(iterable, steps=1):
n = len(buffer)
n //= math.gcd(n, steps)
- for __ in repeat(None, n):
+ for _ in repeat(None, n):
buffer.rotate(steps)
yield tuple(buffer)
diff --git a/contrib/python/more-itertools/py3/more_itertools/more.pyi b/contrib/python/more-itertools/py3/more_itertools/more.pyi
index f1a155dce7..66e6938e13 100644
--- a/contrib/python/more-itertools/py3/more_itertools/more.pyi
+++ b/contrib/python/more-itertools/py3/more_itertools/more.pyi
@@ -3,8 +3,8 @@
from __future__ import annotations
import sys
+import types
-from types import TracebackType
from typing import (
Any,
Callable,
@@ -42,7 +42,7 @@ _Raisable = BaseException | Type[BaseException]
# The type of isinstance's second argument (from typeshed builtins)
if sys.version_info >= (3, 10):
- _ClassInfo = type | UnionType | tuple[_ClassInfo, ...]
+ _ClassInfo = type | types.UnionType | tuple[_ClassInfo, ...]
else:
_ClassInfo = type | tuple[_ClassInfo, ...]
@@ -619,7 +619,7 @@ class callback_iter(Generic[_T], Iterator[_T]):
self,
exc_type: Type[BaseException] | None,
exc_value: BaseException | None,
- traceback: TracebackType | None,
+ traceback: types.TracebackType | None,
) -> bool | None: ...
def __iter__(self) -> callback_iter[_T]: ...
def __next__(self) -> _T: ...
diff --git a/contrib/python/more-itertools/py3/more_itertools/recipes.py b/contrib/python/more-itertools/py3/more_itertools/recipes.py
index a21a1f5d88..67f76fa899 100644
--- a/contrib/python/more-itertools/py3/more_itertools/recipes.py
+++ b/contrib/python/more-itertools/py3/more_itertools/recipes.py
@@ -218,7 +218,12 @@ def all_equal(iterable, key=None):
True
"""
- return len(list(islice(groupby(iterable, key), 2))) <= 1
+ iterator = groupby(iterable, key)
+ for first in iterator:
+ for second in iterator:
+ return False
+ return True
+ return True
def quantify(iterable, pred=bool):