Skip to content

Commit 6406f59

Browse files
committed
Fix type alias with Python 3.8
See https://bugs.python.org/issue45117
1 parent f711736 commit 6406f59

File tree

1 file changed

+3
-3
lines changed
  • aws_lambda_powertools/utilities/parser

1 file changed

+3
-3
lines changed

aws_lambda_powertools/utilities/parser/types.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, Literal, TypeVar
5+
from typing import Any, Dict, Literal, TypeVar, Union
66

77
from pydantic import BaseModel, Json
88

99
Model = TypeVar("Model", bound=BaseModel)
1010
EnvelopeModel = TypeVar("EnvelopeModel")
1111
EventParserReturnType = TypeVar("EventParserReturnType")
12-
AnyInheritedModel = type[BaseModel] | BaseModel
13-
RawDictOrModel = dict[str, Any] | AnyInheritedModel
12+
AnyInheritedModel = Union[type[BaseModel], BaseModel]
13+
RawDictOrModel = Union[Dict[str, Any], AnyInheritedModel]
1414
T = TypeVar("T")
1515

1616
__all__ = ["Json", "Literal"]

0 commit comments

Comments
 (0)