Skip to content

Commit

Permalink
docs: improve waiter classes docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arcan1s committed Aug 23, 2024
1 parent d1ad5ec commit 375374c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ahriman/models/waiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __bool__(self) -> Literal[True]:
indicates whether the waiter completed with success or not
Returns:
Literal[True]: always False
Literal[True]: always ``True``
"""
return True

Expand All @@ -82,7 +82,7 @@ def __bool__(self) -> Literal[False]:
indicates whether the waiter completed with success or not
Returns:
Literal[False]: always False
Literal[False]: always ``False``
"""
return False

Expand All @@ -108,7 +108,7 @@ def is_timed_out(self) -> bool:
check if timer is out
Returns:
bool: True in case current monotonic time is more than :attr:`start_time` and :attr:`wait_timeout`
bool: ``True`` in case current monotonic time is more than :attr:`start_time` and :attr:`wait_timeout`
doesn't equal to 0
"""
since_start = time.monotonic() - self.start_time
Expand All @@ -124,7 +124,7 @@ def wait(self, in_progress: Callable[Params, bool], *args: Params.args, **kwargs
**kwargs(Params.kwargs): keyword arguments for check call
Returns:
WaiterResult: consumed time in seconds
WaiterResult: waiter result object
"""
while not (timed_out := self.is_timed_out()) and in_progress(*args, **kwargs):
time.sleep(self.interval)
Expand Down

0 comments on commit 375374c

Please sign in to comment.