Merge pull request #5485 from jdufresne/ne

Remove unnecessary __ne__ definitions
This commit is contained in:
Takeshi KOMIYA 2018-09-25 08:30:33 +09:00 committed by GitHub
commit 6968ead656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 16 deletions

View File

@ -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'

View File

@ -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):

View File

@ -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

View File

@ -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)