Skip to content

Commit

Permalink
fix: wait overload
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Sep 26, 2024
1 parent 7921909 commit b0f3d8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/timeout_executor/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ def has_result(self) -> bool:
"""check if result is available"""
return self._result is not SENTINEL

@overload
def wait(self, timeout: float | None = None) -> Awaitable[None]: ...
@overload
def wait(
self, timeout: float | None = None, *, do_async: Literal[True] = ...
self, timeout: float | None = None, *, do_async: Literal[True]
) -> Awaitable[None]: ...
@overload
def wait(
self, timeout: float | None = None, *, do_async: Literal[False] = ...
self, timeout: float | None = None, *, do_async: Literal[False]
) -> None: ...
@overload
def wait(
Expand Down

0 comments on commit b0f3d8d

Please sign in to comment.