Преглед изворни кода

Trying to solve "Cannor import Dict"

ogert пре 3 година
родитељ
комит
af9723f0c0
1 измењених фајлова са 6 додато и 6 уклоњено
  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