We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 260dc53 commit 333605eCopy full SHA for 333605e
sentry_sdk/scrubber.py
@@ -1,8 +1,3 @@
1
-try:
2
- from typing import cast
3
-except ImportError:
4
- cast = lambda _, obj: obj
5
-
6
from sentry_sdk.utils import (
7
capture_internal_exceptions,
8
AnnotatedValue,
@@ -96,7 +91,7 @@ def scrub_dict(self, d):
96
91
for k, v in d.items():
97
92
# The cast is needed because mypy is not smart enough to figure out that k must be a
98
93
# string after the isinstance check.
99
- if isinstance(k, str) and cast(str, k).lower() in self.denylist:
94
+ if isinstance(k, str) and k.lower() in self.denylist:
100
95
d[k] = AnnotatedValue.substituted_because_contains_sensitive_data()
101
elif self.recursive:
102
self.scrub_dict(v) # no-op unless v is a dict
0 commit comments