Skip to content

Commit ba20a39

Browse files
committed
Fix some typing after merge
1 parent 3d7b6d6 commit ba20a39

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

sentry_sdk/api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,11 @@ def set_transaction_name(name: str, source: Optional[str] = None) -> None:
344344
return get_current_scope().set_transaction_name(name, source)
345345

346346

347-
def update_current_span(op=None, name=None, attributes=None):
348-
# type: (Optional[str], Optional[str], Optional[dict[str, Union[str, int, float, bool]]]) -> None
347+
def update_current_span(
348+
op: Optional[str] = None,
349+
name: Optional[str] = None,
350+
attributes: Optional[dict[str, Union[str, int, float, bool]]] = None,
351+
) -> None:
349352
"""
350353
Update the current active span with the provided parameters.
351354

sentry_sdk/integrations/anthropic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _set_output_data(
154154
model: str | None,
155155
input_tokens: int,
156156
output_tokens: int,
157-
content_blocks: list[str],
157+
content_blocks: list[Any],
158158
finish_span: bool = False,
159159
) -> None:
160160
"""

sentry_sdk/integrations/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def __init__(
152152
if asgi_version == 3:
153153
self.__call__: Callable[..., Any] = self._run_asgi3
154154
elif asgi_version == 2:
155-
self.__call__: Callable[..., Any] = self._run_asgi2
155+
self.__call__: Callable[..., Any] = self._run_asgi2 # type: ignore
156156

157157
def _capture_lifespan_exception(self, exc: Exception) -> None:
158158
"""Capture exceptions raise in application lifespan handlers.

sentry_sdk/integrations/clickhouse_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _wrap_send_data() -> None:
137137
original_send_data = clickhouse_driver.client.Client.send_data
138138

139139
def _inner_send_data(
140-
self,
140+
self: clickhouse_driver.client.Client,
141141
sample_block: Any,
142142
data: Any,
143143
types_check: bool = False,

sentry_sdk/integrations/django/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def sentry_patched_asgi_handler(
157157
http_methods_to_capture=integration.http_methods_to_capture,
158158
)
159159

160-
return await middleware(self.scope)(receive, send) # type: ignore
160+
return await middleware(self.scope)(receive, send)
161161

162162
cls.__call__ = sentry_patched_asgi_handler
163163

sentry_sdk/integrations/starlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from starlite.plugins.base import get_plugin_for_value # type: ignore
1818
from starlite.routes.http import HTTPRoute # type: ignore
1919
from starlite.utils import ConnectionDataExtractor, is_async_callable, Ref # type: ignore
20-
from pydantic import BaseModel
20+
from pydantic import BaseModel # type: ignore
2121
except ImportError:
2222
raise DidNotEnable("Starlite is not installed")
2323

sentry_sdk/scope.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
Self,
6262
)
6363

64-
from collections.abc import Mapping, MutableMapping
64+
from collections.abc import Mapping
6565

6666
import sentry_sdk
6767
from sentry_sdk._types import (
@@ -627,12 +627,12 @@ def clear(self) -> None:
627627
self._level: Optional[LogLevelStr] = None
628628
self._fingerprint: Optional[List[str]] = None
629629
self._transaction: Optional[str] = None
630-
self._transaction_info: MutableMapping[str, str] = {}
630+
self._transaction_info: Dict[str, str] = {}
631631
self._user: Optional[Dict[str, Any]] = None
632632

633633
self._tags: Dict[str, Any] = {}
634634
self._contexts: Dict[str, Dict[str, Any]] = {}
635-
self._extras: MutableMapping[str, Any] = {}
635+
self._extras: Dict[str, Any] = {}
636636
self._attachments: List[Attachment] = []
637637

638638
self.clear_breadcrumbs()

0 commit comments

Comments
 (0)