From a5cc9283f12e797c6882aa64d93cf401575b41d3 Mon Sep 17 00:00:00 2001 From: Sviatoslav Abakumov Date: Thu, 20 Feb 2025 10:59:39 +0300 Subject: [PATCH] fix(scopes): Add more typing info to Scope.update_from_kwargs's "contexts" The original type hint could be understood as a one-level `dict` of `str` to `Any`, when in fact, it's a two-level dict. --- sentry_sdk/scope.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/scope.py b/sentry_sdk/scope.py index 4e3bb87489..fbe97ddf44 100644 --- a/sentry_sdk/scope.py +++ b/sentry_sdk/scope.py @@ -1568,7 +1568,7 @@ def update_from_kwargs( user=None, # type: Optional[Any] level=None, # type: Optional[LogLevelStr] extras=None, # type: Optional[Dict[str, Any]] - contexts=None, # type: Optional[Dict[str, Any]] + contexts=None, # type: Optional[Dict[str, Dict[str, Any]]] tags=None, # type: Optional[Dict[str, str]] fingerprint=None, # type: Optional[List[str]] ):