From e10df5ede9191370373492203d03e819d7d71ff5 Mon Sep 17 00:00:00 2001 From: sellth Date: Thu, 18 Jan 2024 14:49:12 +0100 Subject: [PATCH] refactor: use proper type checking instead of helper function (#120) --- altamisa/isatab/validate_assay_study.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/altamisa/isatab/validate_assay_study.py b/altamisa/isatab/validate_assay_study.py index 9cd6d3b..f68e831 100644 --- a/altamisa/isatab/validate_assay_study.py +++ b/altamisa/isatab/validate_assay_study.py @@ -13,7 +13,6 @@ from . import models from ..constants import table_headers, table_restrictions, table_tokens from ..exceptions import CriticalIsaValidationWarning, ModerateIsaValidationWarning -from .helpers import is_ontology_term_ref __author__ = "Mathias Kuhring " @@ -87,7 +86,7 @@ def validate(self, material: models.Material): def _validate_material_annotations(self, material: models.Material): # Warn about unnamed materials/data files if there are annotations def has_content(value): - if is_ontology_term_ref(value): + if isinstance(value, models.OntologyTermRef): return value.name or value.accession or value.ontology_name else: return value