Skip to content

Commit

Permalink
refactor: use proper type checking instead of helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
sellth committed Jan 15, 2024
1 parent dcb8942 commit ed89463
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions altamisa/isatab/validate_assay_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <mathias.kuhring@bih-charite.de>"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ed89463

Please sign in to comment.