Skip to content

Commit 02329ce

Browse files
committed
fix(client): Fix mypy type errors
GH-4601
1 parent c96c78c commit 02329ce

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sentry_sdk/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ def _on_flush_done(_: asyncio.Task[None]) -> None:
950950
else:
951951
self.flush(timeout=timeout, callback=callback)
952952
self._close_components()
953-
return None
953+
return None
954954

955955
def flush(
956956
self,
@@ -967,6 +967,7 @@ def flush(
967967
if self.transport is not None:
968968
if timeout is None:
969969
timeout = self.options["shutdown_timeout"]
970+
assert timeout is not None # shutdown_timeout should never be None
970971

971972
self.session_flusher.flush()
972973

@@ -979,12 +980,12 @@ def flush(
979980
)
980981
else:
981982
self.transport.flush(timeout=timeout, callback=callback)
982-
983-
return None
983+
return None
984984

985985
async def _flush_async(
986-
self, timeout: float, callback: Optional[Callable[[int, float], None]]
986+
self, timeout: Optional[float], callback: Optional[Callable[[int, float], None]]
987987
) -> None:
988+
988989
self.session_flusher.flush()
989990
if self.log_batcher is not None:
990991
self.log_batcher.flush()

0 commit comments

Comments
 (0)