Skip to content

Commit

Permalink
line too long
Browse files Browse the repository at this point in the history
  • Loading branch information
artemisart committed Feb 5, 2024
1 parent 986cad2 commit 3cd2c0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions functional/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,9 @@ def sum(self, projection: Callable[[T], Tnumber] = identity) -> Tnumber: # type
"""
return sum(self.map(projection)) # type: ignore # sum wants int but our Tnumber is a bit better

def average(self, projection: Callable[[T], Tnumber] = identity) -> Tnumber: # type: ignore
def average(
self, projection: Callable[[T], Tnumber] = identity
) -> Tnumber: # type: ignore
"""
Takes the average of elements in the sequence
Expand Down Expand Up @@ -1357,7 +1359,8 @@ def reverse(self) -> reversed:
:return: reversed sequence
"""
return reversed(self) # type: ignore
# __reversed__ is supposed to return an iterator but ours does not :/ it's a Sequence (can't call next())
# __reversed__ is supposed to return an iterator but ours does not :/
# it's a Sequence (can't call next())

def distinct(self) -> Sequence[T]:
"""
Expand Down

0 comments on commit 3cd2c0c

Please sign in to comment.