Skip to content

Commit

Permalink
update _iter.py and _iter.pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff committed Jan 23, 2024
1 parent 968cf03 commit 9e45635
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions iterpy/_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def to_set(self) -> set[T]:
return set(self._iterator) # pragma: no cover

### Transformations
def map( # noqa: A003 # Ignore that it's shadowing a python built-in
def map( # Ignore that it's shadowing a python built-in
self,
func: Callable[[T], S],
) -> "Iter[S]":
Expand All @@ -86,7 +86,7 @@ def pmap(
with multiprocessing.Pool() as pool:
return Iter(pool.map(func, self._iterator))

def filter(self, func: Callable[[T], bool]) -> "Iter[T]": # noqa: A003
def filter(self, func: Callable[[T], bool]) -> "Iter[T]":
return Iter(filter(func, self._iterator))

def groupby(
Expand Down
6 changes: 2 additions & 4 deletions iterpy/_iter.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ class Iter(Generic[T]):
def to_tuple(self) -> tuple[T, ...]: ...
def to_consumable(self) -> Iterator[T]: ...
def to_set(self) -> set[T]: ...
def map(self, func: Callable[[T], S]) -> Iter[S]: # noqa: A003
...
def map(self, func: Callable[[T], S]) -> Iter[S]: ...
def pmap(self, func: Callable[[T], S]) -> Iter[S]: ...
def filter(self, func: Callable[[T], bool]) -> Iter[T]: # noqa: A003
...
def filter(self, func: Callable[[T], bool]) -> Iter[T]: ...
def reduce(self, func: Callable[[T, T], T]) -> T: ...
def groupby(
self, func: Callable[[T], str]
Expand Down

0 comments on commit 9e45635

Please sign in to comment.