Skip to content

Commit 1a32183

Browse files
authoredMay 10, 2024··
ref(scope): Fix get_client typing (#3063)
The `Scope.get_client` method is typed as returning `sentry_sdk.client.BaseClient`, but because `sentry_sdk.client` was not imported, the type was resolved as `Any`. This change imports `sentry_sdk.client` to fix the type hints.
1 parent 2cdc635 commit 1a32183

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

Diff for: ‎sentry_sdk/scope.py

+3
Original file line numberDiff line numberDiff line change
@@ -1640,3 +1640,6 @@ def should_send_default_pii():
16401640

16411641
# Circular imports
16421642
from sentry_sdk.client import NonRecordingClient
1643+
1644+
if TYPE_CHECKING:
1645+
import sentry_sdk.client

0 commit comments

Comments
 (0)
Please sign in to comment.