diff options
| author | 2021-06-12 18:49:20 +0200 | |
|---|---|---|
| committer | 2021-06-12 18:54:37 +0200 | |
| commit | 6e775d01174dc359929b93951fa8d6e7067563e3 (patch) | |
| tree | fce38c6b9581ce95e6163243c8fe84d0975be150 | |
| parent | Add an optional loop kwarg to scheduling.create_task (diff) | |
Add Optional typehint to parameter
The indentation was also dedented one level and a trailing comma added
to be consistent over the project
Co-authored-by: ToxicKidz <[email protected]>
| -rw-r--r-- | bot/utils/scheduling.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/utils/scheduling.py b/bot/utils/scheduling.py index b99874508..d3704b7d1 100644 --- a/bot/utils/scheduling.py +++ b/bot/utils/scheduling.py @@ -162,10 +162,10 @@ class Scheduler: def create_task( - coro: t.Awaitable, - *suppressed_exceptions: t.Type[Exception], - event_loop: asyncio.AbstractEventLoop = None, - **kwargs + coro: t.Awaitable, + *suppressed_exceptions: t.Type[Exception], + event_loop: t.Optional[asyncio.AbstractEventLoop] = None, + **kwargs, ) -> asyncio.Task: """ Wrapper for creating asyncio `Task`s which logs exceptions raised in the task. |