Skip to content

Commit

Permalink
🧑‍💻 Fix autocomplete not working missing typehint
Browse files Browse the repository at this point in the history
Add type hint in wrapper functions for BaseStream. Fixes not working autocomplete.
  • Loading branch information
garlontas committed Aug 29, 2023
1 parent 682f5b1 commit bea7f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pystreamapi/_streams/__base_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _operation(func):
To be applied to intermediate operations.
"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
def wrapper(*args, **kwargs) -> BaseStream[K]:
self: BaseStream = args[0]
self._verify_open()
return func(*args, **kwargs)
Expand All @@ -45,7 +45,7 @@ def terminal(func):
"""
@functools.wraps(func)
@_operation
def wrapper(*args, **kwargs):
def wrapper(*args, **kwargs) -> BaseStream[K]:
self: BaseStream = args[0]
self._queue.execute_all()
self._close()
Expand Down

0 comments on commit bea7f31

Please sign in to comment.