|
11 | 11 | ifsys.version_info[:2]>= (3,8): |
12 | 12 | fromtypingimportFinal,Literal,SupportsIndex,TypedDict,Protocol,get_args# noqa: F401 |
13 | 13 | else: |
14 | | -fromtyping_extensionsimportFinal,Literal,SupportsIndex,TypedDict,Protocol,get_args# noqa: F401 |
| 14 | +fromtyping_extensionsimportFinal,Literal,SupportsIndex,TypedDict,Protocol# noqa: F401 |
15 | 15 |
|
16 | 16 | ifsys.version_info[:2]>= (3,10): |
17 | 17 | fromtypingimportTypeGuard# noqa: F401 |
@@ -51,7 +51,10 @@ class ConfigLevels_NT(NamedTuple): |
51 | 51 |
|
52 | 52 |
|
53 | 53 | defis_config_level(inp:str)->TypeGuard[Lit_config_levels]: |
54 | | -returninpinget_args(Lit_config_levels) |
| 54 | +try: |
| 55 | +returninpinget_args(Lit_config_levels) |
| 56 | +exceptNameError:# get_args added in py 3.8 |
| 57 | +returnTrue |
55 | 58 |
|
56 | 59 |
|
57 | 60 | defassert_never(inp:NoReturn,exc:Union[Exception,None]=None)->NoReturn: |
|