Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mypy type linting #177

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Add Sequence.peek typing
Also fixed minor error from the merge
  • Loading branch information
Drvanon committed Mar 26, 2023
commit ace473cdc727d2d88600ee95cd4d88eb42d1414e
3 changes: 2 additions & 1 deletion functional/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def __init__(
transform=None,
engine=None,
max_repr_items=None,
no_wrap=None
):
# pylint: disable=protected-access
"""
Expand Down Expand Up @@ -703,7 +704,7 @@ def for_each(self, func: Callable[[_T_co], Any]) -> None:
for e in self:
func(e)

def peek(self, func: Callable[[_T_co]]}):
def peek(self, func: Callable[[_T_co], None]):
"""
Executes func on each element of the sequence and returns the element

Expand Down