We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73e96cf commit fb6839aCopy full SHA for fb6839a
aws_lambda_powertools/utilities/parser/types.py
@@ -1,13 +1,14 @@
1
"""Generics and other shared types used across parser"""
2
3
+import sys
4
from typing import TypeVar
5
6
from pydantic import BaseModel
7
8
# We only need typing_extensions for python versions <3.8
-try:
9
+if sys.version_info >= (3, 8):
10
from typing import Literal # noqa: F401
-except ImportError:
11
+else:
12
from typing_extensions import Literal # noqa: F401
13
14
Model = TypeVar("Model", bound=BaseModel)
0 commit comments