Skip to content

Commit

Permalink
revert py3.10 style typehinting
Browse files Browse the repository at this point in the history
  • Loading branch information
asasvari authored and attila-s committed Jul 22, 2024
1 parent 55ce61d commit 16beda2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions opentelemetry-api/src/opentelemetry/attributes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

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

self._dict: (
MutableMapping[str, types.AttributeValue]
| OrderedDict[str, types.AttributeValue]
) = {}
self._dict: Union[
MutableMapping[str, types.AttributeValue],
OrderedDict[str, types.AttributeValue],
] = {}
self._lock = threading.RLock()
if attributes:
for key, value in attributes.items():
Expand Down

0 comments on commit 16beda2

Please sign in to comment.