aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/scheduling.py
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-06-12 19:01:32 +0200
committerGravatar Numerlor <[email protected]>2021-06-12 19:01:32 +0200
commitc2122316e5a34a2b9776e5e965a9434e748ab601 (patch)
tree44aebe9c4ed0a2cc0b9a4c96e354ed992f1f607a /bot/utils/scheduling.py
parentAdd Optional typehint to parameter (diff)
Move the suppressed_exceptions argument to an optional kwarg
Forcing it to be passed as a kwarg makes it clearer what the exceptions are for from the caller's side.
Diffstat (limited to '')
-rw-r--r--bot/utils/scheduling.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/utils/scheduling.py b/bot/utils/scheduling.py
index d3704b7d1..bb83b5c0d 100644
--- a/bot/utils/scheduling.py
+++ b/bot/utils/scheduling.py
@@ -163,7 +163,8 @@ class Scheduler:
def create_task(
coro: t.Awaitable,
- *suppressed_exceptions: t.Type[Exception],
+ *,
+ suppressed_exceptions: tuple[t.Type[Exception]] = (),
event_loop: t.Optional[asyncio.AbstractEventLoop] = None,
**kwargs,
) -> asyncio.Task: