ソースを参照

Trying to solve "Cannor import Dict"

ogert 2 年 前
コミット
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