Skip to content

Commit

Permalink
Merge pull request #149 from twisted/dependabot/pip/mypy-38d0ee0751
Browse files Browse the repository at this point in the history
Bump mypy from 1.13.0 to 1.14.0 in the mypy group
  • Loading branch information
glyph authored Jan 6, 2025
2 parents 3706a46 + 1d079e1 commit 04a51a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements_mypy.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mypy==1.13.0
mypy==1.14.0
twisted
hatchling # for types
2 changes: 1 addition & 1 deletion requirements_mypy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ idna==3.7
# via hyperlink
incremental==24.7.2
# via twisted
mypy==1.13.0
mypy==1.14.0
# via -r requirements_mypy.in
mypy-extensions==1.0.0
# via mypy
Expand Down
6 changes: 5 additions & 1 deletion src/incremental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ def __cmp__(self, other: object) -> int:
differ.
"""
if not isinstance(other, self.__class__):
return NotImplemented
# MyPy historically treated NotImplemented as Any, hence no-any-return.
# It doesn't seem to know that types.NotImplementedType exists, so it
# doesn't seem to be possible to correctly type-annotate this method.
# See https://github.com/python/mypy/issues/4791 for more weirdness.
return NotImplemented # type: ignore[no-any-return]
if self.package.lower() != other.package.lower():
raise IncomparableVersions(f"{self.package!r} != {other.package!r}")

Expand Down

0 comments on commit 04a51a5

Please sign in to comment.