Explorar el Código

fix sys.version comparison

ogert hace 3 años
padre
commit
17fc002a62

+ 1 - 1
cdplib/ml_validation/cross_validate_with_fine_tuning.py

@@ -164,7 +164,7 @@ from itertools import zip_longest
 
 from numpy.typing import ArrayLike
 
-if sys.version_info >= (3, 8):
+if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
     from typing import Callable, Dict, Iterable, Union
 else:
     from typing_extensions import Callable, Dict, Iterable, Union

+ 1 - 1
cdplib/ml_validation/fine_tuning.py

@@ -12,7 +12,7 @@ import numpy as np
 
 from numpy.typing import ArrayLike
 
-if sys.version_info >= (3, 8):
+if (sys.version_info.major == 3) & (sys.version_info.minor >= 8):
     from typing import Iterable, Callable
 else:
     from typing_extensions import Iterable, Callable