Skip to content
Snippets Groups Projects
Commit d5420c8b authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: type checking

parent 33c534be
No related branches found
No related tags found
2 merge requests!100WIP: Filling XLSX: Seems to be working.,!93Filling XLSX: Everything except multiple choice.
Pipeline #49387 failed
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
# You should have received a copy of the GNU Affero General Public License # 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/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import caosdb as db import caosdb as db
from caosadvancedtools.cfood import (AbstractFileCFood, assure_has_property, from caosadvancedtools.cfood import (AbstractFileCFood, assure_has_property,
assure_object_is_in_list) assure_object_is_in_list)
...@@ -25,6 +27,9 @@ from .utils import parse_responsibles, reference_records_corresponding_to_files ...@@ -25,6 +27,9 @@ from .utils import parse_responsibles, reference_records_corresponding_to_files
from .withreadme import DATAMODEL as dm from .withreadme import DATAMODEL as dm
from .withreadme import RESULTS, REVISIONOF, WithREADME, get_glob 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): class ExperimentCFood(AbstractFileCFood, WithREADME):
...@@ -53,7 +58,7 @@ class ExperimentCFood(AbstractFileCFood, WithREADME): ...@@ -53,7 +58,7 @@ class ExperimentCFood(AbstractFileCFood, WithREADME):
self.find_referenced_files([RESULTS]) self.find_referenced_files([RESULTS])
@staticmethod @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 # create the project identifiable
name = ExperimentCFood.name_beautifier( name = ExperimentCFood.name_beautifier(
match.group("project_identifier")) match.group("project_identifier"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment