Skip to content

get_instances() should return empty list instead of Exception #74

@bbartley

Description

@bbartley

When a term has no instances, the current behavior is to throw an Exception.

>>> tyto.SO.promoter.get_instances()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bbartley/Dev/git/Owlet/tyto/tyto.py", line 253, in get_instances
    return self.ontology._handler('get_instances', None, self)
  File "/Users/bbartley/Dev/git/Owlet/tyto/tyto.py", line 72, in _handler
    response = method(self, *args)
  File "/Users/bbartley/Dev/git/Owlet/tyto/endpoint/endpoint.py", line 215, in get_instances
    raise Exception(f'{cls} has no instances')
Exception: https://identifiers.org/SO:0000167 has no instances

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions