diff --git a/src/caosadvancedtools/scifolder/experiment_cfood.py b/src/caosadvancedtools/scifolder/experiment_cfood.py index d217719b1ab054ef57d818d18713d476c6e6eed9..6a701d2229d9245379b06f885386b784c17267af 100644 --- a/src/caosadvancedtools/scifolder/experiment_cfood.py +++ b/src/caosadvancedtools/scifolder/experiment_cfood.py @@ -16,6 +16,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. +from typing import TYPE_CHECKING + import caosdb as db from caosadvancedtools.cfood import (AbstractFileCFood, assure_has_property, assure_object_is_in_list) @@ -25,6 +27,9 @@ from .utils import parse_responsibles, reference_records_corresponding_to_files from .withreadme import DATAMODEL as dm from .withreadme import RESULTS, REVISIONOF, WithREADME, get_glob +if TYPE_CHECKING and sys.version_info > (3, 7): + from typing import Tuple + class ExperimentCFood(AbstractFileCFood, WithREADME): @@ -53,7 +58,7 @@ class ExperimentCFood(AbstractFileCFood, WithREADME): self.find_referenced_files([RESULTS]) @staticmethod - def create_identifiable_experiment(match) -> tuple[db.Record, db.Record]: + def create_identifiable_experiment(match) -> Tuple[db.Record, db.Record]: # create the project identifiable name = ExperimentCFood.name_beautifier( match.group("project_identifier"))