Browse Source

trying to fix typing issues

ogert 3 years ago
parent
commit
6e70eecdae

+ 3 - 0
cdplib/hyperopt/HyperoptPipelineSelector.py

@@ -38,6 +38,9 @@ if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
     Literal, Dict, List, Union
 else:
     # from typing_extensions import *
+    from __future__ import annotations
+    Dict = dict
+    List = list
     from typing_extensions import Callable, \
     Literal, Dict, List, Union
 

+ 3 - 0
cdplib/pipeline_selector/PipelineSelector.py

@@ -34,6 +34,9 @@ if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
 else:
     # from typing_extensions import *
     print("I have python version {}.{} and will import typing_extensions".format(sys.version_info.major, sys.version_info.minor))
+    from __future__ import annotations
+    Dict = dict
+    List = list
     from typing_extensions import Callable, TypedDict,\
     Literal, Dict, Iterable, List, Tuple, Union