Browse Source

Trying to solve "Cannor import Dict"

ogert 2 years ago
parent
commit
af9723f0c0
1 changed files with 6 additions and 6 deletions
  1. 6 6
      cdplib/pipeline_selector/PipelineSelector.py

+ 6 - 6
cdplib/pipeline_selector/PipelineSelector.py

@@ -27,13 +27,13 @@ import pandas as pd
 from copy import deepcopy
 from abc import ABC, abstractmethod, abstractproperty
 
-if sys.version_info >= (3, 8):
-    from typing import *
-    # from typing import Callable, TypedDict,\
-    # Literal, Dict, Iterable, List, Tuple, Union
-else:
-    from typing_extensions import Callable, TypedDict,\
+if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
+    from typing import Callable, TypedDict,\
     Literal, Dict, Iterable, List, Tuple, Union
+else:
+    from typing_extensions import *
+    # from typing_extensions import Callable, TypedDict,\
+    # Literal, Dict, Iterable, List, Tuple, Union
 
 import functools
 from sklearn.pipeline import Pipeline