@@ -73,22 +73,19 @@ def to_version(self) -> str:
7373 """Return as a version string - e.g. `1.4`"""
7474 return '.' .join (map (str , self .value ))
7575
76- def __comparable_value (self ) -> tuple [int , int ]:
77- return self .value
78-
7976 def __ne__ (self , other : Any ) -> bool :
8077 if isinstance (other , self .__class__ ):
8178 return self .value != other .value
8279 return NotImplemented # pragma: no cover
8380
8481 def __lt__ (self , other : Any ) -> bool :
8582 if isinstance (other , self .__class__ ):
86- return self .__comparable_value () < other .__comparable_value ()
83+ return self .value < other .value
8784 return NotImplemented # pragma: no cover
8885
8986 def __le__ (self , other : Any ) -> bool :
9087 if isinstance (other , self .__class__ ):
91- return self .__comparable_value () <= other .__comparable_value ()
88+ return self .value <= other .value
9289 return NotImplemented # pragma: no cover
9390
9491 def __eq__ (self , other : Any ) -> bool :
@@ -98,12 +95,12 @@ def __eq__(self, other: Any) -> bool:
9895
9996 def __ge__ (self , other : Any ) -> bool :
10097 if isinstance (other , self .__class__ ):
101- return self .__comparable_value () >= other .__comparable_value ()
98+ return self .value >= other .value
10299 return NotImplemented # pragma: no cover
103100
104101 def __gt__ (self , other : Any ) -> bool :
105102 if isinstance (other , self .__class__ ):
106- return self .__comparable_value () > other .__comparable_value ()
103+ return self .value > other .value
107104 return NotImplemented # pragma: no cover
108105
109106 def __hash__ (self ) -> int :
0 commit comments