Skip to content

Commit 4a7b8ce

Browse files
committed
ref(asyncio): Fix mypy type annotation errors
Gh-4601
1 parent 50553d4 commit 4a7b8ce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sentry_sdk/integrations/asyncio.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ async def _flush() -> None:
148148
if not isinstance(client.transport, AsyncHttpTransport):
149149
return
150150

151-
t = client.close()
151+
t = client.close() # type: ignore
152152
if t is not None:
153-
# Wait for the task to complete.
154-
await t # type: ignore
153+
await t
155154
except Exception:
156155
logger.warning(
157156
"Sentry flush failed during loop shutdown", exc_info=True
@@ -165,7 +164,7 @@ def _patched_close() -> None:
165164
finally:
166165
orig_close()
167166

168-
loop.close = _patched_close
167+
loop.close = _patched_close # type: ignore
169168
loop._sentry_flush_patched = True # type: ignore
170169

171170
_patch_loop_close()

0 commit comments

Comments
 (0)