Browse Source

typing crap

ogert 3 years ago
parent
commit
99722e669e

+ 1 - 1
cdplib/hyperopt/HyperoptPipelineSelector.py

@@ -12,6 +12,7 @@ Created on Tue Oct  6 15:04:25 2020
  the best pipeline so far as well as the entire tuning history
  the best pipeline so far as well as the entire tuning history
  if needed.
  if needed.
 """
 """
+from __future__ import annotations
 
 
 import os
 import os
 import sys
 import sys
@@ -38,7 +39,6 @@ if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
     Literal, Dict, List, Union
     Literal, Dict, List, Union
 else:
 else:
     # from typing_extensions import *
     # from typing_extensions import *
-    from __future__ import annotations
     Dict = dict
     Dict = dict
     List = list
     List = list
     from typing_extensions import Callable, \
     from typing_extensions import Callable, \

+ 2 - 1
cdplib/pipeline_selector/PipelineSelector.py

@@ -16,6 +16,7 @@ Created on Wed Sep 30 14:23:23 2020
  save the current best result in a file or database during training.
  save the current best result in a file or database during training.
  Children classes: hyperopt and custom gridsearch.
  Children classes: hyperopt and custom gridsearch.
 """
 """
+from __future__ import annotations
 
 
 import pickle
 import pickle
 import os
 import os
@@ -34,7 +35,7 @@ if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
 else:
 else:
     # from typing_extensions import *
     # from typing_extensions import *
     print("I have python version {}.{} and will import typing_extensions".format(sys.version_info.major, sys.version_info.minor))
     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
     Dict = dict
     List = list
     List = list
     from typing_extensions import Callable, TypedDict,\
     from typing_extensions import Callable, TypedDict,\