Skip to content

Commit

Permalink
ref(scope): Fix get_client typing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
szokeasaurusrex committed May 10, 2024
1 parent 2cdc635 commit 4a01c21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sentry_sdk/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -1640,3 +1640,6 @@ def should_send_default_pii():

# Circular imports
from sentry_sdk.client import NonRecordingClient

if TYPE_CHECKING:
import sentry_sdk.client

0 comments on commit 4a01c21

Please sign in to comment.