Skip to content

Commit

Permalink
Remove redundant cast
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Mar 13, 2024
1 parent 260dc53 commit 333605e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sentry_sdk/scrubber.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
try:
from typing import cast
except ImportError:
cast = lambda _, obj: obj

from sentry_sdk.utils import (
capture_internal_exceptions,
AnnotatedValue,
Expand Down Expand Up @@ -96,7 +91,7 @@ def scrub_dict(self, d):
for k, v in d.items():
# The cast is needed because mypy is not smart enough to figure out that k must be a
# string after the isinstance check.
if isinstance(k, str) and cast(str, k).lower() in self.denylist:
if isinstance(k, str) and k.lower() in self.denylist:
d[k] = AnnotatedValue.substituted_because_contains_sensitive_data()
elif self.recursive:
self.scrub_dict(v) # no-op unless v is a dict
Expand Down

0 comments on commit 333605e

Please sign in to comment.