8000 improve typing in test · getsentry/sentry-python@1d2253b · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d2253b

Browse files
committed
improve typing in test
1 parent 1e9b617 commit 1d2253b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_logs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
import sys
44
import time
5-
from typing import List, Any
5+
from typing import List, Any, Mapping, Union
66
import pytest
77

88
import sentry_sdk
@@ -17,8 +17,10 @@
1717
)
1818

1919

20-
def otel_attributes_to_dict(otel_attrs: List[Any]):
21-
def _convert_attr(attr: dict[str, str | int | bool]):
20+
def otel_attributes_to_dict(otel_attrs):
21+
# type: (List[Mapping[str, Any]]) -> Mapping[str, Any]
22+
def _convert_attr(attr):
23+
# type: (Mapping[str, Union[str, float, bool]]) -> Any
2224
if "boolValue" in attr:
2325
return bool(attr["boolValue"])
2426
if "doubleValue" in attr:

0 commit comments

Comments
 (0)
0