We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5a868c commit f8c3e38Copy full SHA for f8c3e38
libtmux/_compat.py
@@ -99,6 +99,19 @@ def __init__(self, version: str) -> None:
99
def __str__(self) -> str:
100
return self._version
101
102
+ def __lt__(self, other):
103
+ if isinstance(other, str):
104
+ other = LegacyVersion(other)
105
+ return super().__lt__(other)
106
+
107
+ def __eq__(self, other) -> bool:
108
109
110
+ if not isinstance(other, LegacyVersion):
111
+ return NotImplemented
112
113
+ return self._key == other._key
114
115
def __repr__(self) -> str:
116
return "<LegacyVersion({0})>".format(repr(str(self)))
117
0 commit comments