From 3d22c5df7807ce762792f1f80b8203845909e5c0 Mon Sep 17 00:00:00 2001 From: Elias Ram Date: Tue, 11 Jun 2024 15:59:15 +0200 Subject: [PATCH] ref(metrics): Update type hints for tag values Remove None, Tuple, and List from the MetricTagValue type as these are not supported and might confuse the user --- sentry_sdk/_types.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sentry_sdk/_types.py b/sentry_sdk/_types.py index 7ac85bad57..bd229977a5 100644 --- a/sentry_sdk/_types.py +++ b/sentry_sdk/_types.py @@ -17,7 +17,6 @@ from typing import Any from typing import Callable from typing import Dict - from typing import List from typing import Mapping from typing import NotRequired from typing import Optional @@ -173,14 +172,7 @@ MetricTagsInternal = Tuple[Tuple[str, str], ...] # External representation of tags as a dictionary. - MetricTagValue = Union[ - str, - int, - float, - None, - List[Union[int, str, float, None]], - Tuple[Union[int, str, float, None], ...], - ] + MetricTagValue = Union[str, int, float, None] MetricTags = Mapping[str, MetricTagValue] # Value inside the generator for the metric value.