Skip to content

Commit 6a377be

Browse files
committed
Improved fields hash, eq methods
1 parent a7f3b77 commit 6a377be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

graphene/core/fields.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ def __repr__(self):
184184
def __eq__(self, other):
185185
# Needed for @total_ordering
186186
if isinstance(other, Field):
187-
return self.creation_counter == other.creation_counter and \
188-
self.object_type == other.object_type
187+
return self.creation_counter == other.creation_counter
189188
return NotImplemented
190189

191190
def __lt__(self, other):
@@ -195,7 +194,7 @@ def __lt__(self, other):
195194
return NotImplemented
196195

197196
def __hash__(self):
198-
return hash((self.creation_counter, self.object_type))
197+
return hash((self.creation_counter))
199198

200199
def __copy__(self):
201200
# We need to avoid hitting __reduce__, so define this

0 commit comments

Comments
 (0)