Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniAffCH committed Mar 25, 2024
1 parent 1964ec1 commit d332784
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nncf/common/graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ def __hash__(self) -> int:
return hash(str(self))

def __eq__(self, other: object) -> bool:
if not isinstance(other, NNCFNode):
return False
return self.attributes == other.attributes
return isinstance(other, NNCFNode) and self.attributes == other.attributes


class NNCFGraphEdge:
Expand Down

0 comments on commit d332784

Please sign in to comment.