@@ -77,14 +77,16 @@ def parse(
7777 Throws GraphQLError if a syntax error is encountered.
7878
7979 By default, the parser creates AST nodes that know the location in the source that
80- they correspond to. The `no_location` option disables that behavior for performance
81- or testing.
80+ they correspond to. The `` no_location`` option disables that behavior for
81+ performance or testing.
8282
8383 Experimental features:
8484
85- If `experimental_fragment_variables` is set to True, the parser will understand
86- and parse variable definitions contained in a fragment definition. They'll be
87- represented in the `variable_definitions` field of the `FragmentDefinitionNode`.
85+ If ``experimental_fragment_variables`` is set to ``True``, the parser will
86+ understand and parse variable definitions contained in a fragment definition.
87+ They'll be represented in the
88+ :attr:`~graphql.language.FragmentDefinitionNode.variable_definitions` field
89+ of the :class:`~graphql.language.FragmentDefinitionNode`.
8890
8991 The syntax is identical to normal, query-defined variables. For example::
9092
@@ -110,7 +112,8 @@ def parse_value(
110112 This is useful within tools that operate upon GraphQL Values directly and in
111113 isolation of complete GraphQL documents.
112114
113- Consider providing the results to the utility function: `value_from_ast()`.
115+ Consider providing the results to the utility function:
116+ :func:`~graphql.value_from_ast`.
114117 """
115118 parser = Parser (
116119 source ,
@@ -133,7 +136,8 @@ def parse_type(
133136 This is useful within tools that operate upon GraphQL Types directly and
134137 in isolation of complete GraphQL documents.
135138
136- Consider providing the results to the utility function: `type_from_ast()`.
139+ Consider providing the results to the utility function:
140+ :func:`~graphql.value_from_ast`.
137141 """
138142 parser = Parser (
139143 source ,
@@ -390,7 +394,7 @@ def parse_fragment_definition(self) -> FragmentDefinitionNode:
390394 )
391395
392396 def parse_fragment_name (self ) -> NameNode :
393- """FragmentName: Name but not `on `"""
397+ """FragmentName: Name but not ``on` `"""
394398 if self ._lexer .token .value == "on" :
395399 raise self .unexpected ()
396400 return self .parse_name ()
@@ -1042,9 +1046,10 @@ def any(
10421046 ) -> List [T ]:
10431047 """Fetch any matching nodes, possibly none.
10441048
1045- Returns a possibly empty list of parse nodes, determined by the `parse_fn`.
1046- This list begins with a lex token of `open_kind` and ends with a lex token of
1047- `close_kind`. Advances the parser to the next lex token after the closing token.
1049+ Returns a possibly empty list of parse nodes, determined by the ``parse_fn``.
1050+ This list begins with a lex token of ``open_kind`` and ends with a lex token of
1051+ ``close_kind``. Advances the parser to the next lex token after the closing
1052+ token.
10481053 """
10491054 self .expect_token (open_kind )
10501055 nodes : List [T ] = []
@@ -1058,10 +1063,11 @@ def optional_many(
10581063 ) -> List [T ]:
10591064 """Fetch matching nodes, maybe none.
10601065
1061- Returns a list of parse nodes, determined by the `parse_fn`. It can be empty
1066+ Returns a list of parse nodes, determined by the `` parse_fn` `. It can be empty
10621067 only if the open token is missing, otherwise it will always return a non-empty
1063- list that begins with a lex token of `open_kind` and ends with a lex token of
1064- `close_kind`. Advances the parser to the next lex token after the closing token.
1068+ list that begins with a lex token of ``open_kind`` and ends with a lex token of
1069+ ``close_kind``. Advances the parser to the next lex token after the closing
1070+ token.
10651071 """
10661072 if self .expect_optional_token (open_kind ):
10671073 nodes = [parse_fn ()]
@@ -1076,9 +1082,10 @@ def many(
10761082 ) -> List [T ]:
10771083 """Fetch matching nodes, at least one.
10781084
1079- Returns a non-empty list of parse nodes, determined by the `parse_fn`.
1080- This list begins with a lex token of `open_kind` and ends with a lex token of
1081- `close_kind`. Advances the parser to the next lex token after the closing token.
1085+ Returns a non-empty list of parse nodes, determined by the ``parse_fn``.
1086+ This list begins with a lex token of ``open_kind`` and ends with a lex token of
1087+ ``close_kind``. Advances the parser to the next lex token after the closing
1088+ token.
10821089 """
10831090 self .expect_token (open_kind )
10841091 nodes = [parse_fn ()]
0 commit comments