Skip to content

Commit

Permalink
Update Options.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NewSoupVi authored Nov 30, 2024
1 parent 519e215 commit 242c054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,13 @@ def __gt__(self, other: typing.Union[Choice, int, str]):

def __le__(self, other: typing.Union[Choice, int, str]):
if isinstance(other, str):
assert other in self.options, f"compared against an unknown string. {self} < {other}"
assert other in self.options, f"compared against an unknown string. {self} <= {other}"
other = self.options[other]
return super(Choice, self).__le__(other)

def __ge__(self, other: typing.Union[Choice, int, str]):
if isinstance(other, str):
assert other in self.options, f"compared against an unknown string. {self} < {other}"
assert other in self.options, f"compared against an unknown string. {self} >= {other}"
other = self.options[other]
return super(Choice, self).__ge__(other)

Expand Down

0 comments on commit 242c054

Please sign in to comment.