From 42d75a2707ab4f8a08e6df01e3c3e4bc280d785e Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Mon, 23 Dec 2024 09:27:45 +0100 Subject: [PATCH] Update linting config to work with new mypy version --- sentry_sdk/client.py | 6 +++--- sentry_sdk/integrations/rust_tracing.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sentry_sdk/client.py b/sentry_sdk/client.py index db2cc19110..cf345c41f9 100644 --- a/sentry_sdk/client.py +++ b/sentry_sdk/client.py @@ -532,7 +532,7 @@ def _prepare_event( for key in "release", "environment", "server_name", "dist": if event.get(key) is None and self.options[key] is not None: - event[key] = str(self.options[key]).strip() # type: ignore[literal-required] + event[key] = str(self.options[key]).strip() if event.get("sdk") is None: sdk_info = dict(SDK_INFO) sdk_info["integrations"] = sorted(self.integrations.keys()) @@ -581,7 +581,7 @@ def _prepare_event( self.transport.record_lost_event( "before_send", data_category="error" ) - event = new_event # type: ignore + event = new_event before_send_transaction = self.options["before_send_transaction"] if ( @@ -611,7 +611,7 @@ def _prepare_event( reason="before_send", data_category="span", quantity=spans_delta ) - event = new_event # type: ignore + event = new_event return event diff --git a/sentry_sdk/integrations/rust_tracing.py b/sentry_sdk/integrations/rust_tracing.py index ae52c850c3..e4c211814f 100644 --- a/sentry_sdk/integrations/rust_tracing.py +++ b/sentry_sdk/integrations/rust_tracing.py @@ -44,11 +44,11 @@ class RustTracingLevel(Enum): - Trace: str = "TRACE" - Debug: str = "DEBUG" - Info: str = "INFO" - Warn: str = "WARN" - Error: str = "ERROR" + Trace = "TRACE" + Debug = "DEBUG" + Info = "INFO" + Warn = "WARN" + Error = "ERROR" class EventTypeMapping(Enum):