File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ async def dispatch(
7171 return await call_next (request )
7272
7373 toolbar = DebugToolbar (request , call_next , self .settings )
74- response = await toolbar .process_request (request )
74+ response = t . cast ( StreamingResponse , await toolbar .process_request (request ) )
7575 content_type = response .headers .get ("Content-Type" , "" )
7676 is_html = content_type .startswith ("text/html" )
7777
@@ -87,7 +87,7 @@ async def dispatch(
8787 if is_html :
8888 body = b""
8989
90- async for chunk in response .body_iterator : # type: ignore[attr-defined]
90+ async for chunk in response .body_iterator :
9191 if not isinstance (chunk , bytes ):
9292 chunk = chunk .encode (response .charset )
9393 body += chunk
@@ -104,7 +104,7 @@ async def dispatch(
104104 async def stream () -> t .AsyncGenerator [bytes , None ]:
105105 yield body
106106
107- response .body_iterator = stream () # type: ignore[attr-defined]
107+ response .body_iterator = stream ()
108108 else :
109109 data = parse .quote (json .dumps (toolbar .refresh ()))
110110 response .set_cookie (key = "dtRefresh" , value = data )
You can’t perform that action at this time.
0 commit comments