From 462c00dbbcea8926fc8f3d60b2d43bfb3638247f Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Tue, 25 Apr 2023 11:20:43 -0500 Subject: [PATCH 1/3] docstring updates: fix zip_longest -> enumerate --- src/flupy/fluent.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/flupy/fluent.py b/src/flupy/fluent.py index 96257eb..24b32a1 100644 --- a/src/flupy/fluent.py +++ b/src/flupy/fluent.py @@ -6,12 +6,9 @@ from itertools import dropwhile, groupby, islice, product, takewhile, tee, zip_longest from random import sample from typing import ( - TYPE_CHECKING, Any, Callable, Collection, - Container, - ContextManager, Deque, Generator, Generic, @@ -20,7 +17,6 @@ Iterator, List, Optional, - Sequence, Set, Tuple, Type, @@ -546,7 +542,7 @@ def zip( "Fluent[Tuple[T, _T1, _T2, _T3]]", ]: """Yields tuples containing the i-th element from the i-th - argument in the chainable, and the iterable + argument in the instance, and the iterable >>> flu(range(5)).zip(range(3, 0, -1)).to_list() [(0, 3), (1, 2), (2, 1)] @@ -558,7 +554,7 @@ def zip( def zip_longest(self, *iterable: Iterable[_T1], fill_value: Any = None) -> "Fluent[Tuple[T, ...]]": """Yields tuples containing the i-th element from the i-th - argument in the chainable, and the iterable + argument in the instance, and the iterable Iteration continues until the longest iterable is exhaused. If iterables are uneven in length, missing values are filled in with fill value @@ -572,11 +568,11 @@ def zip_longest(self, *iterable: Iterable[_T1], fill_value: Any = None) -> "Flue return Fluent(zip_longest(self, *iterable, fillvalue=fill_value)) def enumerate(self, start: int = 0) -> "Fluent[Tuple[int, T]]": - """Yields tuples from the chainable where the first element + """Yields tuples from the instance where the first element is a count from initial value *start*. - >>> flu(range(5)).zip_longest(range(3, 0, -1)).to_list() - [(0, 3), (1, 2), (2, 1), (3, None), (4, None)] + >>> flu([3,4,5]).enumerate().to_list() + [(0, 3), (1, 4), (2, 5)] """ return Fluent(enumerate(self, start=start)) From 6f29fdce01ac66dcaef5e0cc0a3664d305debecb Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Tue, 25 Apr 2023 11:22:19 -0500 Subject: [PATCH 2/3] remove precommit action badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 90bc4d8..3577baf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@

-Tests Tests From 9f4d2b972510f3d0823466761ba1caee2aab3800 Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Tue, 25 Apr 2023 11:24:11 -0500 Subject: [PATCH 3/3] update python version CI matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3fb32b..ca6858e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: