Skip to content

Commit 16beda2

Browse files
asasvariattila-s
authored andcommitted
revert py3.10 style typehinting
1 parent 55ce61d commit 16beda2

File tree

1 file changed

+5
-5
lines changed
  • opentelemetry-api/src/opentelemetry/attributes

1 file changed

+5
-5
lines changed

opentelemetry-api/src/opentelemetry/attributes/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
def _clean_attribute(
3232
key: str, value: types.AttributeValue, max_len: Optional[int]
33-
) -> Optional[Union[types.AttributeValue, tuple[str | int | float, ...]]]:
33+
) -> Optional[Union[types.AttributeValue, tuple[Union[str, int, float], ...]]]:
3434
"""Checks if attribute value is valid and cleans it if required.
3535
3636
The function returns the cleaned value or None if the value is not valid.
@@ -149,10 +149,10 @@ def __init__(
149149
self.max_value_len = max_value_len
150150
# OrderedDict is not used until the maxlen is reached for efficiency.
151151

152-
self._dict: (
153-
MutableMapping[str, types.AttributeValue]
154-
| OrderedDict[str, types.AttributeValue]
155-
) = {}
152+
self._dict: Union[
153+
MutableMapping[str, types.AttributeValue],
154+
OrderedDict[str, types.AttributeValue],
155+
] = {}
156156
self._lock = threading.RLock()
157157
if attributes:
158158
for key, value in attributes.items():

0 commit comments

Comments
 (0)