Skip to content

Commit

Permalink
Merge pull request #475 from silbe/version-recursion-fix
Browse files Browse the repository at this point in the history
Version: avoid infinite recursion
  • Loading branch information
zarath committed Mar 11, 2022
2 parents 8432dcf + ca97287 commit 4d4ff52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NanoVNASaver/Version.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def __gt__(self, other: "Version") -> bool:
return False

def __lt__(self, other: "Version") -> bool:
return other > self
return other.__gt__(self)

def __ge__(self, other: "Version") -> bool:
return self > other or self == other
return self.__gt__(other) or self.__eq__(other)

def __le__(self, other: "Version") -> bool:
return self < other or self == other
return other.__gt__(self) or self.__eq__(other)

def __eq__(self, other: "Version") -> bool:
return self.data == other.data
Expand Down

0 comments on commit 4d4ff52

Please sign in to comment.