diff options
author | 2020-03-15 20:47:02 +0100 | |
---|---|---|
committer | 2020-03-15 20:47:02 +0100 | |
commit | f9cef6ae66e49c566d416a3b2bad7d34c3704a80 (patch) | |
tree | b07ac444631eb8a8f30852fd0f764d3ffce9f6c1 /bot/decorators.py | |
parent | Deseasonify: remove fragile attr dependency in `seasonal_task` (diff) |
Deseasonify: relax type annotation
Asyncio's sleep will accept both, and we default to an int, so might
as well not break our own promise.
Diffstat (limited to 'bot/decorators.py')
-rw-r--r-- | bot/decorators.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/decorators.py b/bot/decorators.py index 3ce3d8c4..74976cd6 100644 --- a/bot/decorators.py +++ b/bot/decorators.py @@ -32,7 +32,7 @@ class InMonthCheckFailure(CheckFailure): pass -def seasonal_task(*allowed_months: Month, sleep_time: float = ONE_DAY) -> typing.Callable: +def seasonal_task(*allowed_months: Month, sleep_time: typing.Union[float, int] = ONE_DAY) -> typing.Callable: """ Perform the decorated method periodically in `allowed_months`. |