Better representation of Extend and Remove

This commit is contained in:
Jesse Hills 2024-05-15 11:21:00 +12:00
parent 1b2d7d0067
commit a5cccacf61
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,9 @@ class Extend:
def __str__(self):
return f"!extend {self.value}"
def __repr__(self):
return f"Extend({self.value})"
def __eq__(self, b):
"""
Check if two Extend objects contain the same ID.
@ -24,6 +27,9 @@ class Remove:
def __str__(self):
return f"!remove {self.value}"
def __repr__(self):
return f"Remove({self.value})"
def __eq__(self, b):
"""
Check if two Remove objects contain the same ID.