Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
uhbrar committed Aug 23, 2024
1 parent af41f8f commit 56c4c79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reasoner_pydantic/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def update(self, other):
raise NotImplementedError(
f"Model {self.__class__.__name__} has no update method"
)

def get_field(self, field):
getattr(self, field, None)

Expand Down
5 changes: 4 additions & 1 deletion reasoner_pydantic/kgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def update(self, other):
# We need to make sure we don't add a second KL/AT
new_attributes = HashableSet[Attribute]
for attribute in other.attributes:
if attribute.attribute_type_id not in ("biolink:knowledge_level", "biolink:agent_type"):
if attribute.attribute_type_id not in (
"biolink:knowledge_level",
"biolink:agent_type",
):
new_attributes.add(attribute)
self.attributes.update(new_attributes)
else:
Expand Down

0 comments on commit 56c4c79

Please sign in to comment.