3535from sentry_sdk ._types import SENSITIVE_DATA_SUBSTITUTE
3636
3737if TYPE_CHECKING :
38- from typing import Any , Dict , List , Mapping , Optional
38+ from typing import Any , Dict , List , Literal , Mapping , Optional
3939
4040 from sentry_sdk ._types import (
4141 DatabaseCollectionBehaviour ,
@@ -236,6 +236,7 @@ def should_collect_body_type(
236236
237237
238238def _map_from_send_default_pii (
239+ * ,
239240 send_default_pii : bool ,
240241 include_local_variables : bool ,
241242 include_source_context : bool ,
@@ -461,12 +462,9 @@ def resolve_data_collection(options: "Dict[str, Any]") -> "DataCollection":
461462 """
462463 user_dc = options .get ("data_collection" )
463464 send_default_pii = options .get ("send_default_pii" )
464- include_local_variables = options .get ("include_local_variables" )
465- if include_local_variables is None :
466- include_local_variables = True
467- include_source_context = options .get ("include_source_context" )
468- if include_source_context is None :
469- include_source_context = True
465+
466+ include_local_variables = options .get ("include_local_variables" , True )
467+ include_source_context = options .get ("include_source_context" , True )
470468
471469 if user_dc is not None :
472470 if not isinstance (user_dc , dict ):
@@ -478,8 +476,7 @@ def resolve_data_collection(options: "Dict[str, Any]") -> "DataCollection":
478476 if send_default_pii is not None :
479477 warnings .warn (
480478 "`send_default_pii` is deprecated and ignored when "
481- "`data_collection` is set. `data_collection` is the single "
482- "source of truth for automatic data collection." ,
479+ "`data_collection` is set." ,
483480 DeprecationWarning ,
484481 stacklevel = 2 ,
485482 )
0 commit comments