We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 136a8f9 commit 3b885eeCopy full SHA for 3b885ee
sentry_sdk/traces.py
@@ -398,6 +398,9 @@ def _end(
398
scope: "Optional[sentry_sdk.Scope]" = (
399
scope or self._scope or sentry_sdk.get_current_scope()
400
)
401
+ if scope is None:
402
+ # Can't happen but mypy doesn't realize
403
+ return
404
405
# Explicit check against False needed because self.sampled might be None
406
if self.sampled is False:
0 commit comments