Skip to content

Commit

Permalink
refactor: use proper type checking instead of helper function (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
sellth authored Jan 18, 2024
1 parent e9427cd commit e10df5e
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 <[email protected]>"

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 e10df5e

Please sign in to comment.