Skip to content

Commit

Permalink
Fix more MyPy noise
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Jul 7, 2024
1 parent 799b7f1 commit a7e100e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/incremental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def __repr__(self): # type: () -> str
def __str__(self): # type: () -> str
return "[%s, version %s]" % (self.package, self.short())

def __cmp__(self, other): # type: (Version) -> int
def __cmp__(self, other): # type: (object) -> int
"""
Compare two versions, considering major versions, minor versions, micro
versions, then release candidates, then postreleases, then dev
Expand Down Expand Up @@ -300,40 +300,40 @@ def __cmp__(self, other): # type: (Version) -> int
)
return x

def __eq__(self, other):
def __eq__(self, other): # type: (object) -> bool
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c # type: ignore
return c == 0

def __ne__(self, other):
def __ne__(self, other): # type: (object) -> bool
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c # type: ignore
return c != 0

def __lt__(self, other):
def __lt__(self, other): # type: (object) -> bool
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c # type: ignore
return c < 0

def __le__(self, other):
def __le__(self, other): # type: (object) -> bool
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c # type: ignore
return c <= 0

def __gt__(self, other):
def __gt__(self, other): # type: (object) -> bool
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c # type: ignore
return c > 0

def __ge__(self, other):
def __ge__(self, other): # type: (object) -> bool
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c # type: ignore
return c >= 0


Expand Down

0 comments on commit a7e100e

Please sign in to comment.