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 1a5daa8 commit 9306d46Copy full SHA for 9306d46
src/libtmux/_compat.py
@@ -105,6 +105,19 @@ def __init__(self, version: str) -> None:
105
def __str__(self) -> str:
106
return self._version
107
108
+ def __lt__(self, other):
109
+ if isinstance(other, str):
110
+ other = LegacyVersion(other)
111
+ return super().__lt__(other)
112
+
113
+ def __eq__(self, other) -> bool:
114
115
116
+ if not isinstance(other, LegacyVersion):
117
+ return NotImplemented
118
119
+ return self._key == other._key
120
121
def __repr__(self) -> str:
122
return "<LegacyVersion({0})>".format(repr(str(self)))
123
0 commit comments