Skip to content

Commit 0c3be5c

Browse files
committed
narrow the type on a variable
1 parent 52d19aa commit 0c3be5c

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

sentry_sdk/data_collection.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from typing import TYPE_CHECKING, cast
2727

2828
if TYPE_CHECKING:
29-
from typing import Any, Dict
29+
from typing import Any, Dict, Literal
3030

3131
from sentry_sdk._types import (
3232
DatabaseCollectionBehaviour,
@@ -88,11 +88,8 @@ def _map_from_send_default_pii(
8888
Build a fully-resolved ``DataCollection`` dict that mirrors the data
8989
``send_default_pii`` collects today. Used when ``data_collection`` is not
9090
provided explicitly.
91-
92-
PII-bearing content gates on ``send_default_pii``: ``graphql.variables`` and
93-
``database.query_params`` follow it, while ``graphql.document`` stays ``True``.
9491
"""
95-
kv_mode = "deny_list" if send_default_pii else "off"
92+
kv_mode: "Literal['deny_list', 'off']" = "deny_list" if send_default_pii else "off"
9693
return {
9794
"provided_by_user": False,
9895
"user_info": send_default_pii,

0 commit comments

Comments
 (0)