Skip to content

Commit 1497916

Browse files
authored
ref(metrics): Update type hints for tag values (#3156)
Remove Tuple and List from the MetricTagValue type as these are not supported and might confuse the user. See getsentry/relay#3691 for more information.
1 parent e5e2016 commit 1497916

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sentry_sdk/_types.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from typing import Any
1818
from typing import Callable
1919
from typing import Dict
20-
from typing import List
2120
from typing import Mapping
2221
from typing import NotRequired
2322
from typing import Optional
@@ -173,14 +172,7 @@
173172
MetricTagsInternal = Tuple[Tuple[str, str], ...]
174173

175174
# External representation of tags as a dictionary.
176-
MetricTagValue = Union[
177-
str,
178-
int,
179-
float,
180-
None,
181-
List[Union[int, str, float, None]],
182-
Tuple[Union[int, str, float, None], ...],
183-
]
175+
MetricTagValue = Union[str, int, float, None]
184176
MetricTags = Mapping[str, MetricTagValue]
185177

186178
# Value inside the generator for the metric value.

0 commit comments

Comments
 (0)