Skip to content

Commit

Permalink
Allow the filter function return bool
Browse files Browse the repository at this point in the history
this unblocks problems with the partials and lambdas
  • Loading branch information
zhukovgreen committed Nov 27, 2024
1 parent 4869121 commit 5462e79
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion friendly_sequences/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def flatten(

def filter(
self: Seq[T],
func: Callable[[T], PT.TypeGuard[U]],
func: Callable[[T], PT.TypeGuard[U] | bool],
) -> Seq[U]:
return Seq(filter(func, self))

Expand Down
Loading

0 comments on commit 5462e79

Please sign in to comment.