aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-15 20:47:02 +0100
committerGravatar kwzrd <[email protected]>2020-03-15 20:47:02 +0100
commitf9cef6ae66e49c566d416a3b2bad7d34c3704a80 (patch)
treeb07ac444631eb8a8f30852fd0f764d3ffce9f6c1
parentDeseasonify: 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.
-rw-r--r--bot/decorators.py2
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`.