Skip to content

Commit 9038808

Browse files
committed
Skip source loc comparation for ast.Nodes. Fixed #71
1 parent 1c0a238 commit 9038808

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

graphql/language/ast.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __eq__(self, other):
2222
return (
2323
self is other or (
2424
isinstance(other, Document) and
25-
self.loc == other.loc and
25+
# self.loc == other.loc and
2626
self.definitions == other.definitions
2727
)
2828
)
@@ -58,7 +58,7 @@ def __eq__(self, other):
5858
return (
5959
self is other or (
6060
isinstance(other, OperationDefinition) and
61-
self.loc == other.loc and
61+
# self.loc == other.loc and
6262
self.operation == other.operation and
6363
self.name == other.name and
6464
self.variable_definitions == other.variable_definitions and
@@ -104,7 +104,7 @@ def __eq__(self, other):
104104
return (
105105
self is other or (
106106
isinstance(other, VariableDefinition) and
107-
self.loc == other.loc and
107+
# self.loc == other.loc and
108108
self.variable == other.variable and
109109
self.type == other.type and
110110
self.default_value == other.default_value
@@ -142,7 +142,7 @@ def __eq__(self, other):
142142
return (
143143
self is other or (
144144
isinstance(other, SelectionSet) and
145-
self.loc == other.loc and
145+
# self.loc == other.loc and
146146
self.selections == other.selections
147147
)
148148
)
@@ -182,7 +182,7 @@ def __eq__(self, other):
182182
return (
183183
self is other or (
184184
isinstance(other, Field) and
185-
self.loc == other.loc and
185+
# self.loc == other.loc and
186186
self.alias == other.alias and
187187
self.name == other.name and
188188
self.arguments == other.arguments and
@@ -227,7 +227,7 @@ def __eq__(self, other):
227227
return (
228228
self is other or (
229229
isinstance(other, Argument) and
230-
self.loc == other.loc and
230+
# self.loc == other.loc and
231231
self.name == other.name and
232232
self.value == other.value
233233
)
@@ -263,7 +263,7 @@ def __eq__(self, other):
263263
return (
264264
self is other or (
265265
isinstance(other, FragmentSpread) and
266-
self.loc == other.loc and
266+
# self.loc == other.loc and
267267
self.name == other.name and
268268
self.directives == other.directives
269269
)
@@ -300,7 +300,7 @@ def __eq__(self, other):
300300
return (
301301
self is other or (
302302
isinstance(other, InlineFragment) and
303-
self.loc == other.loc and
303+
# self.loc == other.loc and
304304
self.type_condition == other.type_condition and
305305
self.directives == other.directives and
306306
self.selection_set == other.selection_set
@@ -341,7 +341,7 @@ def __eq__(self, other):
341341
return (
342342
self is other or (
343343
isinstance(other, FragmentDefinition) and
344-
self.loc == other.loc and
344+
# self.loc == other.loc and
345345
self.name == other.name and
346346
self.type_condition == other.type_condition and
347347
self.directives == other.directives and
@@ -386,7 +386,7 @@ def __eq__(self, other):
386386
return (
387387
self is other or (
388388
isinstance(other, Variable) and
389-
self.loc == other.loc and
389+
# self.loc == other.loc and
390390
self.name == other.name
391391
)
392392
)
@@ -418,7 +418,7 @@ def __eq__(self, other):
418418
return (
419419
self is other or (
420420
isinstance(other, IntValue) and
421-
self.loc == other.loc and
421+
# self.loc == other.loc and
422422
self.value == other.value
423423
)
424424
)
@@ -450,7 +450,7 @@ def __eq__(self, other):
450450
return (
451451
self is other or (
452452
isinstance(other, FloatValue) and
453-
self.loc == other.loc and
453+
# self.loc == other.loc and
454454
self.value == other.value
455455
)
456456
)
@@ -482,7 +482,7 @@ def __eq__(self, other):
482482
return (
483483
self is other or (
484484
isinstance(other, StringValue) and
485-
self.loc == other.loc and
485+
# self.loc == other.loc and
486486
self.value == other.value
487487
)
488488
)
@@ -514,7 +514,7 @@ def __eq__(self, other):
514514
return (
515515
self is other or (
516516
isinstance(other, BooleanValue) and
517-
self.loc == other.loc and
517+
# self.loc == other.loc and
518518
self.value == other.value
519519
)
520520
)
@@ -546,7 +546,7 @@ def __eq__(self, other):
546546
return (
547547
self is other or (
548548
isinstance(other, EnumValue) and
549-
self.loc == other.loc and
549+
# self.loc == other.loc and
550550
self.value == other.value
551551
)
552552
)
@@ -578,7 +578,7 @@ def __eq__(self, other):
578578
return (
579579
self is other or (
580580
isinstance(other, ListValue) and
581-
self.loc == other.loc and
581+
# self.loc == other.loc and
582582
self.values == other.values
583583
)
584584
)
@@ -610,7 +610,7 @@ def __eq__(self, other):
610610
return (
611611
self is other or (
612612
isinstance(other, ObjectValue) and
613-
self.loc == other.loc and
613+
# self.loc == other.loc and
614614
self.fields == other.fields
615615
)
616616
)
@@ -643,7 +643,7 @@ def __eq__(self, other):
643643
return (
644644
self is other or (
645645
isinstance(other, ObjectField) and
646-
self.loc == other.loc and
646+
# self.loc == other.loc and
647647
self.name == other.name and
648648
self.value == other.value
649649
)
@@ -679,7 +679,7 @@ def __eq__(self, other):
679679
return (
680680
self is other or (
681681
isinstance(other, Directive) and
682-
self.loc == other.loc and
682+
# self.loc == other.loc and
683683
self.name == other.name and
684684
self.arguments == other.arguments
685685
)
@@ -718,7 +718,7 @@ def __eq__(self, other):
718718
return (
719719
self is other or (
720720
isinstance(other, NamedType) and
721-
self.loc == other.loc and
721+
# self.loc == other.loc and
722722
self.name == other.name
723723
)
724724
)
@@ -750,7 +750,7 @@ def __eq__(self, other):
750750
return (
751751
self is other or (
752752
isinstance(other, ListType) and
753-
self.loc == other.loc and
753+
# self.loc == other.loc and
754754
self.type == other.type
755755
)
756756
)
@@ -782,7 +782,7 @@ def __eq__(self, other):
782782
return (
783783
self is other or (
784784
isinstance(other, NonNullType) and
785-
self.loc == other.loc and
785+
# self.loc == other.loc and
786786
self.type == other.type
787787
)
788788
)
@@ -814,7 +814,7 @@ def __eq__(self, other):
814814
return (
815815
self is other or (
816816
isinstance(other, Name) and
817-
self.loc == other.loc and
817+
# self.loc == other.loc and
818818
self.value == other.value
819819
)
820820
)
@@ -924,7 +924,7 @@ def __eq__(self, other):
924924
return (
925925
self is other or (
926926
isinstance(other, ObjectTypeDefinition) and
927-
self.loc == other.loc and
927+
# self.loc == other.loc and
928928
self.name == other.name and
929929
self.interfaces == other.interfaces and
930930
self.fields == other.fields
@@ -964,7 +964,7 @@ def __eq__(self, other):
964964
return (
965965
self is other or (
966966
isinstance(other, FieldDefinition) and
967-
self.loc == other.loc and
967+
# self.loc == other.loc and
968968
self.name == other.name and
969969
self.arguments == other.arguments and
970970
self.type == other.type
@@ -1004,7 +1004,7 @@ def __eq__(self, other):
10041004
return (
10051005
self is other or (
10061006
isinstance(other, InputValueDefinition) and
1007-
self.loc == other.loc and
1007+
# self.loc == other.loc and
10081008
self.name == other.name and
10091009
self.type == other.type and
10101010
self.default_value == other.default_value
@@ -1043,7 +1043,7 @@ def __eq__(self, other):
10431043
return (
10441044
self is other or (
10451045
isinstance(other, InterfaceTypeDefinition) and
1046-
self.loc == other.loc and
1046+
# self.loc == other.loc and
10471047
self.name == other.name and
10481048
self.fields == other.fields
10491049
)
@@ -1079,7 +1079,7 @@ def __eq__(self, other):
10791079
return (
10801080
self is other or (
10811081
isinstance(other, UnionTypeDefinition) and
1082-
self.loc == other.loc and
1082+
# self.loc == other.loc and
10831083
self.name == other.name and
10841084
self.types == other.types
10851085
)
@@ -1114,7 +1114,7 @@ def __eq__(self, other):
11141114
return (
11151115
self is other or (
11161116
isinstance(other, ScalarTypeDefinition) and
1117-
self.loc == other.loc and
1117+
# self.loc == other.loc and
11181118
self.name == other.name
11191119
)
11201120
)
@@ -1147,7 +1147,7 @@ def __eq__(self, other):
11471147
return (
11481148
self is other or (
11491149
isinstance(other, EnumTypeDefinition) and
1150-
self.loc == other.loc and
1150+
# self.loc == other.loc and
11511151
self.name == other.name and
11521152
self.values == other.values
11531153
)
@@ -1182,7 +1182,7 @@ def __eq__(self, other):
11821182
return (
11831183
self is other or (
11841184
isinstance(other, EnumValueDefinition) and
1185-
self.loc == other.loc and
1185+
# self.loc == other.loc and
11861186
self.name == other.name
11871187
)
11881188
)
@@ -1215,7 +1215,7 @@ def __eq__(self, other):
12151215
return (
12161216
self is other or (
12171217
isinstance(other, InputObjectTypeDefinition) and
1218-
self.loc == other.loc and
1218+
# self.loc == other.loc and
12191219
self.name == other.name and
12201220
self.fields == other.fields
12211221
)
@@ -1250,7 +1250,7 @@ def __eq__(self, other):
12501250
return (
12511251
self is other or (
12521252
isinstance(other, TypeExtensionDefinition) and
1253-
self.loc == other.loc and
1253+
# self.loc == other.loc and
12541254
self.definition == other.definition
12551255
)
12561256
)
@@ -1286,7 +1286,7 @@ def __eq__(self, other):
12861286
isinstance(other, DirectiveDefinition) and
12871287
self.name == other.name and
12881288
self.locations == other.locations and
1289-
self.loc == other.loc and
1289+
# self.loc == other.loc and
12901290
self.arguments == other.arguments
12911291
)
12921292
)

0 commit comments

Comments
 (0)