File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
predicthq/endpoints/v1/beam Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 22from datetime import datetime
33from predicthq .endpoints .schemas import ArgKwargResultSet
44from typing import Optional , List
5- from typing import Annotated , Literal
65
7- # Check if we're running on Python < 3.11
86# Python < 3.11 does not have StrEnum in the enum module
97import sys
108if sys .version_info < (3 , 11 ):
@@ -15,6 +13,18 @@ class StrEnum(str, enum.Enum):
1513else :
1614 from enum import StrEnum
1715
16+ # Python < 3.9 does not have Annotated in the enum module
17+ if sys .version_info < (3 , 9 ):
18+ from typing_extensions import Annotated
19+ else :
20+ from typing import Annotated , Literal
21+
22+ # Python < 3.8 does not have Literal in the enum module
23+ if sys .version_info < (3 , 8 ):
24+ from typing_extensions import Literal
25+ else :
26+ from typing import Literal
27+
1828
1929class BeamPaginationResultSet (ArgKwargResultSet ):
2030 def has_next (self ):
You can’t perform that action at this time.
0 commit comments