Skip to content

Commit

Permalink
Add docblock, fix formatting, fix implicit optional typing
Browse files Browse the repository at this point in the history
  • Loading branch information
eelkevdbos committed Sep 27, 2023
1 parent 45b6e6d commit e6e31d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sanic/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,18 @@ def add( # type: ignore

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
Expand Down

0 comments on commit e6e31d0

Please sign in to comment.