summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-09-23 19:45:38 -0700
committerJon Dufresne <jon.dufresne@gmail.com>2018-09-23 19:45:38 -0700
commitcfd5ac06c0f7bceb0a47bff922dcea99ba48d0a2 (patch)
tree6a7f3e2104e744a9339c377a89bb14cdd21587b0 /sphinx/pycode/parser.py
parentff8df59ac1f2a725ec9f6ebcb862de35487c8e25 (diff)
downloadsphinx-git-cfd5ac06c0f7bceb0a47bff922dcea99ba48d0a2.tar.gz
Remove unnecessary __ne__ definitions
In Python 3, __ne__ defaults to the inverse of __eq__. From https://docs.python.org/3/reference/datamodel.html#object.__ne__ > By default, __ne__() delegates to __eq__() and inverts the result > unless it is NotImplemented.
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r--sphinx/pycode/parser.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index 559083100..e1aa1f504 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -128,10 +128,6 @@ class Token:
else:
raise ValueError('Unknown value: %r' % other)
- def __ne__(self, other):
- # type: (Any) -> bool
- return not (self == other)
-
def match(self, *conditions):
# type: (Any) -> bool
return any(self == candidate for candidate in conditions)