Skip to content

Commit 6370d6b

Browse files
committed
Implement __ne__ method consistently
1 parent df0f899 commit 6370d6b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/graphql/error/graphql_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __eq__(self, other):
169169
)
170170

171171
def __ne__(self, other):
172-
return not self.__eq__(other)
172+
return not self == other
173173

174174
@property
175175
def formatted(self):

src/graphql/error/invalid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __eq__(self, other):
2020
return other is INVALID
2121

2222
def __ne__(self, other):
23-
return not self.__eq__(other)
23+
return not self == other
2424

2525

2626
# Used to indicate invalid values (like "undefined" in GraphQL.js):

src/graphql/language/ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __eq__(self, other):
169169
return False
170170

171171
def __ne__(self, other):
172-
return not self.__eq__(other)
172+
return not self == other
173173

174174
def __hash__(self):
175175
return hash((self.start, self.end))

0 commit comments

Comments
 (0)