Skip to content

Commit

Permalink
Merge pull request #15 from pomponchik/develop
Browse files Browse the repository at this point in the history
0.0.10
  • Loading branch information
pomponchik authored Nov 23, 2023
2 parents 6f02ec4 + b9f3939 commit 121cb5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cantok/tokens/abstract_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ def is_cancelled(self, direct: bool = True) -> bool:

async def wait(self, step: Union[int, float] = 0.0001, timeout: Optional[Union[int, float]] = None) -> None:
if step < 0:
raise ValueError
raise ValueError('The token polling iteration time cannot be less than zero.')
if timeout is not None and timeout < 0:
raise ValueError
raise ValueError('The total timeout of waiting cannot be less than zero.')
if timeout is not None and step > timeout:
raise ValueError
raise ValueError('The total timeout of waiting cannot be less than the time of one iteration of the token polling.')

if timeout is None:
from cantok import SimpleToken
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cantok"
version = "0.0.9"
version = "0.0.10"
authors = [
{ name="Evgeniy Blinov", email="zheni-b@yandex.ru" },
]
Expand Down

0 comments on commit 121cb5e

Please sign in to comment.