@@ -155,7 +155,9 @@ async def inner(receive: Any, send: Any) -> Any:
155155 async def _run_asgi3 (self , scope : Any , receive : Any , send : Any ) -> Any :
156156 return await self ._run_app (scope , receive , send , asgi_version = 3 )
157157
158- async def _run_original_app (self , scope : Any , receive : Any , send : Any , asgi_version : int ) -> Any :
158+ async def _run_original_app (
159+ self , scope : Any , receive : Any , send : Any , asgi_version : int
160+ ) -> Any :
159161 try :
160162 if asgi_version == 2 :
161163 return await self .app (scope )(receive , send )
@@ -166,7 +168,9 @@ async def _run_original_app(self, scope: Any, receive: Any, send: Any, asgi_vers
166168 _capture_exception (exc , mechanism_type = self .mechanism_type )
167169 raise exc from None
168170
169- async def _run_app (self , scope : Any , receive : Any , send : Any , asgi_version : int ) -> Any :
171+ async def _run_app (
172+ self , scope : Any , receive : Any , send : Any , asgi_version : int
173+ ) -> Any :
170174 is_recursive_asgi_middleware = _asgi_middleware_applied .get (False )
171175 is_lifespan = scope ["type" ] == "lifespan"
172176 if is_recursive_asgi_middleware or is_lifespan :
@@ -220,7 +224,9 @@ async def _run_app(self, scope: Any, receive: Any, send: Any, asgi_version: int)
220224 logger .debug ("[ASGI] Started transaction: %s" , span )
221225 span .set_tag ("asgi.type" , ty )
222226
223- async def _sentry_wrapped_send (event : "Dict[str, Any]" ) -> Any :
227+ async def _sentry_wrapped_send (
228+ event : "Dict[str, Any]" ,
229+ ) -> Any :
224230 is_http_response = (
225231 event .get ("type" ) == "http.response.start"
226232 and span is not None
@@ -237,7 +243,9 @@ async def _sentry_wrapped_send(event: "Dict[str, Any]") -> Any:
237243 finally :
238244 _asgi_middleware_applied .set (False )
239245
240- def event_processor (self , event : "Event" , hint : "Hint" , asgi_scope : Any ) -> "Optional[Event]" :
246+ def event_processor (
247+ self , event : "Event" , hint : "Hint" , asgi_scope : Any
248+ ) -> "Optional[Event]" :
241249 request_data = event .get ("request" , {})
242250 request_data .update (_get_request_data (asgi_scope ))
243251 event ["request" ] = deepcopy (request_data )
@@ -276,7 +284,9 @@ def event_processor(self, event: "Event", hint: "Hint", asgi_scope: Any) -> "Opt
276284 # data to your liking it's recommended to use the `before_send` callback
277285 # for that.
278286
279- def _get_transaction_name_and_source (self , transaction_style : str , asgi_scope : Any ) -> "Tuple[str, str]" :
287+ def _get_transaction_name_and_source (
288+ self , transaction_style : str , asgi_scope : Any
289+ ) -> "Tuple[str, str]" :
280290 name = None
281291 source = SOURCE_FOR_STYLE [transaction_style ]
282292 ty = asgi_scope .get ("type" )
0 commit comments