Add docblock, fix formatting, fix implicit optional typing

This commit is contained in:
Eelke van den Bos 2023-09-27 09:24:16 -04:00
parent 45b6e6d8c4
commit e6e31d0a99
No known key found for this signature in database
GPG Key ID: 1C4557680E6F7B77

View File

@ -277,12 +277,18 @@ class SignalRouter(BaseRouter):
return cast(Signal, signal)
def finalize(self, do_compile: bool = True, do_optimize: bool = False, loop: asyncio.AbstractEventLoop = None):
def finalize(
self,
do_compile: bool = True,
do_optimize: bool = False,
loop: Optional[asyncio.AbstractEventLoop] = None,
):
"""Finalize the router and compile the routes
Args:
do_compile (bool, optional): Whether to compile the routes. Defaults to `True`.
do_optimize (bool, optional): Whether to optimize the routes. Defaults to `False`.
loop (asyncio.AbstractEventLoop, optional): Event loop override for asyncio.get_running_loop().
Returns:
SignalRouter: The router