Skip to content

Commit

Permalink
some predicates may not have an inverse
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardBruskiewich committed Jun 23, 2023
1 parent 19b28d0 commit 6bb3ab8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reasoner_validator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,15 +755,15 @@ def case_input_found_in_response(

bmt: Optional[Toolkit] = bmtw.get_bmt()
predicate_descendants: List[str]
inverse_predicate_descendants: List[str]
inverse_predicate_descendants: List[str] = list() # may sometimes remain empty...
if bmt is not None:
predicate_descendants = bmt.get_descendants(predicate, formatted=True)
inverse_predicate = bmtw.get_inverse_predicate(predicate)
inverse_predicate_descendants = bmt.get_descendants(inverse_predicate, formatted=True)
if inverse_predicate:
inverse_predicate_descendants = bmt.get_descendants(inverse_predicate, formatted=True)
else:
# simpler case in which we are ignoring deep Biolink Model validation
predicate_descendants = [predicate]
inverse_predicate_descendants = list()

edge_id_match: Optional[str] = None
subject_match: Optional[str] = None
Expand Down

0 comments on commit 6bb3ab8

Please sign in to comment.