Skip to content

Commit

Permalink
.skip/.distinct: fix genericity of return type
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Jan 16, 2025
1 parent b4b9cc0 commit 7f9a9a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streamable/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def display(self, level: int = logging.INFO) -> "Stream[T]":

def distinct(
self, key: Optional[Callable[[T], Any]] = None, consecutive_only: bool = False
) -> "Stream":
) -> "Stream[T]":
"""
Filters the stream to yield only distinct elements.
If a deduplication `key` is specified, `foo` and `bar` are treated as duplicates when `key(foo) == key(bar)`.
Expand Down Expand Up @@ -429,7 +429,7 @@ def observe(self, what: str = "elements") -> "Stream[T]":
"""
return ObserveStream(self, what)

def skip(self, count: int) -> "Stream":
def skip(self, count: int) -> "Stream[T]":
"""
Skips the first `count` elements.
Expand Down

0 comments on commit 7f9a9a0

Please sign in to comment.