Skip to content

Commit

Permalink
Make state Enum comparable with ==
Browse files Browse the repository at this point in the history
  • Loading branch information
pya committed Apr 6, 2024
1 parent 4a5acc9 commit f615ddd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pymf6/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def show_states(cls):
# pylint: disable=no-member
print(*cls._member_names_, sep='\n')

def __eq__(self, other):
return self.value == other.value


class Simulator:
"""
Expand Down

0 comments on commit f615ddd

Please sign in to comment.