Skip to content

Commit e4a76b7

Browse files
ci: Remove unneeded type ignores and duplicate declarations
1 parent 008c296 commit e4a76b7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

sentry_sdk/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ def capture_event(
864864
865865
:returns: An event ID. May be `None` if there is no DSN set or of if the SDK decided to discard the event for other reasons. In such situations setting `debug=True` on `init()` may help.
866866
"""
867-
hint: "Hint" = dict(hint or ())
867+
hint = dict(hint or ())
868868

869869
if not self._should_capture(event, hint, scope):
870870
return None
@@ -948,7 +948,7 @@ def _capture_telemetry(
948948
if ty == "log":
949949
before_send = get_before_send_log(self.options)
950950
elif ty == "metric":
951-
before_send = get_before_send_metric(self.options) # type: ignore
951+
before_send = get_before_send_metric(self.options)
952952

953953
if before_send is not None:
954954
telemetry = before_send(telemetry, {}) # type: ignore
@@ -960,9 +960,9 @@ def _capture_telemetry(
960960
if ty == "log":
961961
batcher = self.log_batcher
962962
elif ty == "metric":
963-
batcher = self.metrics_batcher # type: ignore
963+
batcher = self.metrics_batcher
964964
elif ty == "span":
965-
batcher = self.span_batcher # type: ignore
965+
batcher = self.span_batcher
966966

967967
if batcher is not None:
968968
batcher.add(telemetry) # type: ignore

sentry_sdk/hub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __init__(
146146
scope = get_isolation_scope().fork()
147147
current_scope = get_current_scope().fork()
148148
else:
149-
client = client_or_hub # type: ignore
149+
client = client_or_hub
150150
get_global_scope().set_client(client)
151151

152152
if scope is None: # so there is no Hub cloning going on

0 commit comments

Comments
 (0)