@@ -105,6 +105,7 @@ async def send_outbound(
105105 Args:
106106 message: The `OutboundMessage` to be sent
107107 **kwargs: Additional keyword arguments
108+
108109 """
109110 profile = self ._profile ()
110111 if not profile :
@@ -117,6 +118,7 @@ async def send_webhook(self, topic: str, payload: dict):
117118 Args:
118119 topic: the webhook topic identifier
119120 payload: the webhook payload value
121+
120122 """
121123 warnings .warn (
122124 "responder.send_webhook is deprecated; please use the event bus instead." ,
@@ -136,7 +138,6 @@ def send_fn(self) -> Coroutine:
136138@web .middleware
137139async def ready_middleware (request : web .BaseRequest , handler : Coroutine ):
138140 """Only continue if application is ready to take work."""
139-
140141 is_status_check = str (request .rel_url ).rstrip ("/" ) in status_paths
141142 is_app_ready = request .app ._state .get ("ready" )
142143
@@ -241,7 +242,6 @@ async def upgrade_middleware(request: web.BaseRequest, handler: Coroutine):
241242@web .middleware
242243async def debug_middleware (request : web .BaseRequest , handler : Coroutine ):
243244 """Show request detail in debug log."""
244-
245245 if LOGGER .isEnabledFor (logging .DEBUG ): # Skipped if DEBUG is not enabled
246246 LOGGER .debug ("Incoming request: %s %s" , request .method , request .path_qs )
247247 is_status_check = str (request .rel_url ).startswith ("/status/" )
@@ -282,6 +282,7 @@ def __init__(
282282 conductor_stop (Coroutine): Conductor (graceful) stop for shutdown API call.
283283 task_queue (TaskQueue, optional): An optional task queue for handlers.
284284 conductor_stats (Coroutine, optional): Conductor statistics API call.
285+
285286 """
286287 self .app = None
287288 self .admin_api_key = context .settings .get ("admin.admin_api_key" )
@@ -302,7 +303,6 @@ def __init__(
302303
303304 async def make_application (self ) -> web .Application :
304305 """Get the aiohttp application instance."""
305-
306306 middlewares = [ready_middleware , debug_middleware ]
307307
308308 # admin-token and admin-token are mutually exclusive and required.
@@ -566,7 +566,6 @@ def notify_fatal_error(self):
566566
567567 async def websocket_handler (self , request ):
568568 """Send notifications to admin client over websocket."""
569-
570569 ws = web .WebSocketResponse ()
571570 await ws .prepare (request )
572571 socket_id = str (uuid4 ())
0 commit comments