@@ -476,33 +476,33 @@ def parse_value_literal(parser, is_const):
476
476
477
477
elif token .kind == TokenKind .INT :
478
478
advance (parser )
479
- return ast .IntValue ( # type: ignore
480
- value = token .value , loc = loc (parser , token .start )
479
+ return ast .IntValue (
480
+ value = token .value , loc = loc (parser , token .start ) # type: ignore
481
481
)
482
482
483
483
elif token .kind == TokenKind .FLOAT :
484
484
advance (parser )
485
- return ast .FloatValue ( # type: ignore
486
- value = token .value , loc = loc (parser , token .start )
485
+ return ast .FloatValue (
486
+ value = token .value , loc = loc (parser , token .start ) # type: ignore
487
487
)
488
488
489
489
elif token .kind == TokenKind .STRING :
490
490
advance (parser )
491
- return ast .StringValue ( # type: ignore
492
- value = token .value , loc = loc (parser , token .start )
491
+ return ast .StringValue (
492
+ value = token .value , loc = loc (parser , token .start ) # type: ignore
493
493
)
494
494
495
495
elif token .kind == TokenKind .NAME :
496
496
if token .value in ("true" , "false" ):
497
497
advance (parser )
498
- return ast .BooleanValue ( # type: ignore
498
+ return ast .BooleanValue (
499
499
value = token .value == "true" , loc = loc (parser , token .start )
500
500
)
501
501
502
502
if token .value != "null" :
503
503
advance (parser )
504
- return ast .EnumValue ( # type: ignore
505
- value = token .value , loc = loc (parser , token .start )
504
+ return ast .EnumValue (
505
+ value = token .value , loc = loc (parser , token .start ) # type: ignore
506
506
)
507
507
508
508
elif token .kind == TokenKind .DOLLAR :
@@ -728,10 +728,10 @@ def parse_field_definition(parser):
728
728
# type: (Parser) -> FieldDefinition
729
729
start = parser .token .start
730
730
731
- return ast .FieldDefinition ( # type: ignore
731
+ return ast .FieldDefinition (
732
732
name = parse_name (parser ),
733
733
arguments = parse_argument_defs (parser ),
734
- type = expect (parser , TokenKind .COLON ) and parse_type (parser ),
734
+ type = expect (parser , TokenKind .COLON ) and parse_type (parser ), # type: ignore
735
735
directives = parse_directives (parser ),
736
736
loc = loc (parser , start ),
737
737
)
@@ -749,9 +749,9 @@ def parse_input_value_def(parser):
749
749
# type: (Parser) -> InputValueDefinition
750
750
start = parser .token .start
751
751
752
- return ast .InputValueDefinition ( # type: ignore
752
+ return ast .InputValueDefinition (
753
753
name = parse_name (parser ),
754
- type = expect (parser , TokenKind .COLON ) and parse_type (parser ),
754
+ type = expect (parser , TokenKind .COLON ) and parse_type (parser ), # type: ignore
755
755
default_value = parse_const_value (parser )
756
756
if skip (parser , TokenKind .EQUALS )
757
757
else None ,
@@ -780,10 +780,11 @@ def parse_union_type_definition(parser):
780
780
start = parser .token .start
781
781
expect_keyword (parser , "union" )
782
782
783
- return ast .UnionTypeDefinition ( # type: ignore
783
+ return ast .UnionTypeDefinition (
784
784
name = parse_name (parser ),
785
785
directives = parse_directives (parser ),
786
- types = expect (parser , TokenKind .EQUALS ) and parse_union_members (parser ),
786
+ types = expect (parser , TokenKind .EQUALS ) # type: ignore
787
+ and parse_union_members (parser ),
787
788
loc = loc (parser , start ),
788
789
)
789
790
0 commit comments