diff --git a/src/qusi/finite_standard_light_curve_dataset.py b/src/qusi/finite_standard_light_curve_dataset.py index 33f4188b..581b437d 100644 --- a/src/qusi/finite_standard_light_curve_dataset.py +++ b/src/qusi/finite_standard_light_curve_dataset.py @@ -1,6 +1,9 @@ from dataclasses import dataclass from functools import partial -from typing import List, Callable, Any, Self +try: + from typing import List, Callable, Any, Self +except ImportError: + from typing_extensions import List, Callable, Any, Self import numpy as np from torch.utils.data import Dataset diff --git a/src/qusi/finite_test_session.py b/src/qusi/finite_test_session.py index 4368ce18..d6c575e4 100644 --- a/src/qusi/finite_test_session.py +++ b/src/qusi/finite_test_session.py @@ -1,4 +1,7 @@ -from typing import List +try: + from typing import List +except ImportError: + from typing_extensions import List import torch from torch.nn import Module diff --git a/src/qusi/infer_session.py b/src/qusi/infer_session.py index b97fc92d..a3a11d88 100644 --- a/src/qusi/infer_session.py +++ b/src/qusi/infer_session.py @@ -1,4 +1,7 @@ -from typing import List +try: + from typing import List +except ImportError: + from typing_extensions import List import numpy as np import torch diff --git a/src/qusi/light_curve_transforms.py b/src/qusi/light_curve_transforms.py index 52d183ad..69817ea1 100644 --- a/src/qusi/light_curve_transforms.py +++ b/src/qusi/light_curve_transforms.py @@ -1,4 +1,7 @@ -from typing import Tuple +try: + from typing import Tuple +except ImportError: + from typing_extensions import Tuple import torch import numpy.typing as npt diff --git a/src/qusi/train_logging_configuration.py b/src/qusi/train_logging_configuration.py index 6d5e353f..408daf04 100644 --- a/src/qusi/train_logging_configuration.py +++ b/src/qusi/train_logging_configuration.py @@ -1,5 +1,8 @@ from dataclasses import dataclass -from typing import Any, Dict +try: + from typing import Any, Dict +except ImportError: + from typing_extensions import Any, Dict @dataclass diff --git a/src/qusi/train_session.py b/src/qusi/train_session.py index c6d80489..5a8652ac 100644 --- a/src/qusi/train_session.py +++ b/src/qusi/train_session.py @@ -1,5 +1,8 @@ from pathlib import Path -from typing import List, Optional +try: + from typing import List, Optional +except ImportError: + from typing_extensions import List, Optional import numpy as np import stringcase diff --git a/src/qusi/wandb_liaison.py b/src/qusi/wandb_liaison.py index db6a9a17..e8a12d27 100644 --- a/src/qusi/wandb_liaison.py +++ b/src/qusi/wandb_liaison.py @@ -1,4 +1,7 @@ -from typing import Any, Dict +try: + from typing import Any, Dict +except ImportError: + from typing_extensions import Any, Dict import wandb as wandb