Commit 95ca4041 authored by Julian Andres Klode's avatar Julian Andres Klode
Browse files

Pacify mypy 0.790 for NotImplemented returns

Mypy 0.790 complains that:

apt/ error: Variable "builtins.NotImplemented" is not valid as a type
apt/ note: See

This worked fine in 0.782.

As a workaround, use Any instead of NotImplemented. Ugh

See for more
parent c11bb33c
......@@ -421,7 +421,7 @@ class Version(object):
def _cmp(self, other):
# type: (Any) -> Union[int, NotImplemented]
# type: (Any) -> Union[int, Any]
"""Compares against another apt.Version object or a version string.
This method behaves like Python 2's cmp builtin and returns an integer
......@@ -471,7 +471,7 @@ class Version(object):
return self._cmp(other) < 0
def __ne__(self, other):
# type: (object) -> Union[bool, NotImplemented]
# type: (object) -> Union[bool, Any]
return self._cmp(other) != 0
except TypeError:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment