8000 ref(scope): Fix `get_client` typing · getsentry/sentry-python@4a01c21 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4a01c21

Browse files
ref(scope): Fix get_client typing
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 4a01c21

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sentry_sdk/scope.py

Lines changed: 3 additions & 0 deletions
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)
0