mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5485 from jdufresne/ne
Remove unnecessary __ne__ definitions
This commit is contained in:
commit
6968ead656
@ -208,10 +208,6 @@ class BuildInfo:
|
||||
return (self.config_hash == other.config_hash and
|
||||
self.tags_hash == other.tags_hash)
|
||||
|
||||
def __ne__(self, other): # type: ignore
|
||||
# type: (BuildInfo) -> bool
|
||||
return not (self == other) # for py27
|
||||
|
||||
def dump(self, f):
|
||||
# type: (IO) -> None
|
||||
f.write('# Sphinx build info version 1\n'
|
||||
|
@ -611,10 +611,6 @@ class ASTBase(UnicodeMixin):
|
||||
return False
|
||||
return True
|
||||
|
||||
def __ne__(self, other):
|
||||
# type: (Any) -> bool
|
||||
return not self.__eq__(other)
|
||||
|
||||
__hash__ = None # type: Callable[[], int]
|
||||
|
||||
def clone(self):
|
||||
|
@ -138,10 +138,6 @@ class _TranslationProxy(UserString):
|
||||
# type: (Any) -> bool
|
||||
return self.data == other
|
||||
|
||||
def __ne__(self, other):
|
||||
# type: (Any) -> bool
|
||||
return self.data != other
|
||||
|
||||
def __gt__(self, other):
|
||||
# type: (unicode) -> bool
|
||||
return self.data > other
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user