Skip to content

Commit 333605e

Browse files
committed
Remove redundant cast
1 parent 260dc53 commit 333605e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sentry_sdk/scrubber.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
try:
2-
from typing import cast
3-
except ImportError:
4-
cast = lambda _, obj: obj
5-
61
from sentry_sdk.utils import (
72
capture_internal_exceptions,
83
AnnotatedValue,
@@ -96,7 +91,7 @@ def scrub_dict(self, d):
9691
for k, v in d.items():
9792
# The cast is needed because mypy is not smart enough to figure out that k must be a
9893
# 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:
10095
d[k] = AnnotatedValue.substituted_because_contains_sensitive_data()
10196
elif self.recursive:
10297
self.scrub_dict(v) # no-op unless v is a dict

0 commit comments

Comments
 (0)