diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-08-12 19:57:03 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-08-12 19:57:03 -0400 |
| commit | 1b27726f6b5922658a5968aa0b7a92fb76bc0ade (patch) | |
| tree | d46dd1aabb9e272c423c20e8d594a26ee083e2a8 /pkg_resources/_vendor/packaging/_structures.py | |
| parent | 9d7b246c0f40fabb25741a023849bf14919e408d (diff) | |
| download | python-setuptools-git-1b27726f6b5922658a5968aa0b7a92fb76bc0ade.tar.gz | |
Update packaging to 20.4. Closes #2310.
Diffstat (limited to 'pkg_resources/_vendor/packaging/_structures.py')
| -rw-r--r-- | pkg_resources/_vendor/packaging/_structures.py | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/pkg_resources/_vendor/packaging/_structures.py b/pkg_resources/_vendor/packaging/_structures.py index 68dcca63..800d5c55 100644 --- a/pkg_resources/_vendor/packaging/_structures.py +++ b/pkg_resources/_vendor/packaging/_structures.py @@ -4,65 +4,83 @@ from __future__ import absolute_import, division, print_function -class Infinity(object): +class InfinityType(object): def __repr__(self): + # type: () -> str return "Infinity" def __hash__(self): + # type: () -> int return hash(repr(self)) def __lt__(self, other): + # type: (object) -> bool return False def __le__(self, other): + # type: (object) -> bool return False def __eq__(self, other): + # type: (object) -> bool return isinstance(other, self.__class__) def __ne__(self, other): + # type: (object) -> bool return not isinstance(other, self.__class__) def __gt__(self, other): + # type: (object) -> bool return True def __ge__(self, other): + # type: (object) -> bool return True def __neg__(self): + # type: (object) -> NegativeInfinityType return NegativeInfinity -Infinity = Infinity() +Infinity = InfinityType() -class NegativeInfinity(object): +class NegativeInfinityType(object): def __repr__(self): + # type: () -> str return "-Infinity" def __hash__(self): + # type: () -> int return hash(repr(self)) def __lt__(self, other): + # type: (object) -> bool return True def __le__(self, other): + # type: (object) -> bool return True def __eq__(self, other): + # type: (object) -> bool return isinstance(other, self.__class__) def __ne__(self, other): + # type: (object) -> bool return not isinstance(other, self.__class__) def __gt__(self, other): + # type: (object) -> bool return False def __ge__(self, other): + # type: (object) -> bool return False def __neg__(self): + # type: (object) -> InfinityType return Infinity -NegativeInfinity = NegativeInfinity() +NegativeInfinity = NegativeInfinityType() |
