|
14 | 14 | import gzip |
15 | 15 | import logging |
16 | 16 | from dataclasses import dataclass |
17 | | -from datetime import UTC, datetime, timedelta |
18 | | -from typing import TYPE_CHECKING, Any, override |
| 17 | +from datetime import datetime, timedelta, timezone |
| 18 | +from typing import TYPE_CHECKING, Any |
| 19 | + |
| 20 | +from typing_extensions import override |
19 | 21 |
|
20 | 22 | from ...resilience import ( |
21 | 23 | CircuitBreaker, |
@@ -270,7 +272,7 @@ def _transform_span_to_protobuf(self, clean_span: CleanSpanData) -> Any: |
270 | 272 |
|
271 | 273 | timestamp = datetime.fromtimestamp( |
272 | 274 | clean_span.timestamp.seconds + clean_span.timestamp.nanos / 1_000_000_000, |
273 | | - tz=UTC, |
| 275 | + tz=timezone.utc, |
274 | 276 | ) |
275 | 277 |
|
276 | 278 | duration = timedelta( |
@@ -339,8 +341,8 @@ def convert_json_schema(sdk_schema: Any) -> Any: |
339 | 341 | type=type_value, |
340 | 342 | properties=proto_properties, |
341 | 343 | items=proto_items, |
342 | | - encoding=encoding_value, # type: ignore[arg-type] |
343 | | - decoded_type=decoded_type_value, # type: ignore[arg-type] |
| 344 | + encoding=encoding_value, |
| 345 | + decoded_type=decoded_type_value, |
344 | 346 | match_importance=sdk_schema.match_importance, |
345 | 347 | ) |
346 | 348 |
|
@@ -370,7 +372,7 @@ def convert_json_schema(sdk_schema: Any) -> Any: |
370 | 372 | timestamp=timestamp, |
371 | 373 | duration=duration, |
372 | 374 | is_root_span=clean_span.is_root_span, |
373 | | - metadata=metadata_struct, # type: ignore[arg-type] |
| 375 | + metadata=metadata_struct, |
374 | 376 | ) |
375 | 377 |
|
376 | 378 |
|
|
0 commit comments