Skip to content

Commit 855212b

Browse files
committed
ref(transport): Fix type issues in AsyncTransport
Fix type issues in the Async Transport. GH-4601
1 parent cad92e5 commit 855212b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sentry_sdk/transport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ async def send_envelope_wrapper() -> None:
647647
def capture_envelope(self: Self, envelope: Envelope) -> None:
648648
# Synchronous entry point
649649
try:
650-
# We are on the main thread running the event loop
651650
asyncio.get_running_loop()
651+
# We are on the main thread running the event loop
652652
task = asyncio.create_task(self._capture_envelope(envelope))
653653
self.background_tasks.add(task)
654654
task.add_done_callback(self.background_tasks.discard)
@@ -680,7 +680,7 @@ async def flush_async(
680680

681681
def _get_pool_options(self: Self) -> Dict[str, Any]:
682682
options: Dict[str, Any] = {
683-
"http2": False, # no HTTP2 for now, should probably just work with this setting
683+
"http2": False, # no HTTP2 for now
684684
"retries": 3,
685685
}
686686

@@ -767,7 +767,7 @@ def kill(self: Self) -> None:
767767
task.cancel()
768768
self.background_tasks.clear()
769769

770-
self._loop.create_task(self._pool.aclose()) # type: ignore
770+
self.loop.create_task(self._pool.aclose()) # type: ignore
771771

772772

773773
class HttpTransport(BaseHttpTransport):

0 commit comments

Comments
 (0)