From d5420c8b292fdeb1c646f7e4576f7cf4d443f68f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Wed, 3 Apr 2024 13:15:25 +0200
Subject: [PATCH] FIX: type checking

---
 src/caosadvancedtools/scifolder/experiment_cfood.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/caosadvancedtools/scifolder/experiment_cfood.py b/src/caosadvancedtools/scifolder/experiment_cfood.py
index d217719b..6a701d22 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"))
-- 
GitLab