138138}
139139
140140# ignore the following undocumented or internal references:
141- ignore_references = set (
142- [
143- "GNT" ,
144- "GT" ,
145- "KT" ,
146- "T" ,
147- "VT" ,
148- "TContext" ,
149- "Enum" ,
150- "traceback" ,
151- "types.TracebackType" ,
152- "TypeMap" ,
153- "AwaitableOrValue" ,
154- "DeferredFragmentRecord" ,
155- "DeferUsage" ,
156- "EnterLeaveVisitor" ,
157- "ExperimentalIncrementalExecutionResults" ,
158- "FieldGroup" ,
159- "FormattedIncrementalResult" ,
160- "FormattedPendingResult" ,
161- "FormattedSourceLocation" ,
162- "GraphQLAbstractType" ,
163- "GraphQLCompositeType" ,
164- "GraphQLEnumValueMap" ,
165- "GraphQLErrorExtensions" ,
166- "GraphQLFieldResolver" ,
167- "GraphQLInputType" ,
168- "GraphQLNullableType" ,
169- "GraphQLOutputType" ,
170- "GraphQLTypeResolver" ,
171- "GroupedFieldSet" ,
172- "IncrementalDataRecord" ,
173- "IncrementalResult" ,
174- "InitialResultRecord" ,
175- "Middleware" ,
176- "PendingResult" ,
177- "StreamItemsRecord" ,
178- "StreamRecord" ,
179- "SubsequentDataRecord" ,
180- "asyncio.events.AbstractEventLoop" ,
181- "collections.abc.MutableMapping" ,
182- "collections.abc.MutableSet" ,
183- "enum.Enum" ,
184- "graphql.execution.collect_fields.DeferUsage" ,
185- "graphql.execution.collect_fields.CollectFieldsResult" ,
186- "graphql.execution.collect_fields.FieldGroup" ,
187- "graphql.execution.execute.StreamArguments" ,
188- "graphql.execution.execute.StreamUsage" ,
189- "graphql.execution.map_async_iterable.map_async_iterable" ,
190- "graphql.execution.incremental_publisher.CompletedResult" ,
191- "graphql.execution.incremental_publisher.DeferredFragmentRecord" ,
192- "graphql.execution.incremental_publisher.DeferredGroupedFieldSetRecord" ,
193- "graphql.execution.incremental_publisher.FormattedCompletedResult" ,
194- "graphql.execution.incremental_publisher.FormattedPendingResult" ,
195- "graphql.execution.incremental_publisher.IncrementalPublisher" ,
196- "graphql.execution.incremental_publisher.InitialResultRecord" ,
197- "graphql.execution.incremental_publisher.PendingResult" ,
198- "graphql.execution.incremental_publisher.StreamItemsRecord" ,
199- "graphql.execution.incremental_publisher.StreamRecord" ,
200- "graphql.execution.Middleware" ,
201- "graphql.language.lexer.EscapeSequence" ,
202- "graphql.language.visitor.EnterLeaveVisitor" ,
203- "graphql.pyutils.ref_map.K" ,
204- "graphql.pyutils.ref_map.V" ,
205- "graphql.type.definition.GT_co" ,
206- "graphql.type.definition.GNT_co" ,
207- "graphql.type.definition.TContext" ,
208- "graphql.type.schema.InterfaceImplementations" ,
209- "graphql.validation.validation_context.VariableUsage" ,
210- "graphql.validation.rules.known_argument_names.KnownArgumentNamesOnDirectivesRule" ,
211- "graphql.validation.rules.provided_required_arguments.ProvidedRequiredArgumentsOnDirectivesRule" ,
212- ]
213- )
141+ ignore_references = {
142+ "GNT" ,
143+ "GT" ,
144+ "KT" ,
145+ "T" ,
146+ "VT" ,
147+ "TContext" ,
148+ "Enum" ,
149+ "traceback" ,
150+ "types.TracebackType" ,
151+ "TypeMap" ,
152+ "AwaitableOrValue" ,
153+ "DeferredFragmentRecord" ,
154+ "DeferUsage" ,
155+ "EnterLeaveVisitor" ,
156+ "ExperimentalIncrementalExecutionResults" ,
157+ "FieldGroup" ,
158+ "FormattedIncrementalResult" ,
159+ "FormattedPendingResult" ,
160+ "FormattedSourceLocation" ,
161+ "GraphQLAbstractType" ,
162+ "GraphQLCompositeType" ,
163+ "GraphQLEnumValueMap" ,
164+ "GraphQLErrorExtensions" ,
165+ "GraphQLFieldResolver" ,
166+ "GraphQLInputType" ,
167+ "GraphQLNullableType" ,
168+ "GraphQLOutputType" ,
169+ "GraphQLTypeResolver" ,
170+ "GroupedFieldSet" ,
171+ "IncrementalDataRecord" ,
172+ "IncrementalResult" ,
173+ "InitialResultRecord" ,
174+ "Middleware" ,
175+ "PendingResult" ,
176+ "StreamItemsRecord" ,
177+ "StreamRecord" ,
178+ "SubsequentDataRecord" ,
179+ "asyncio.events.AbstractEventLoop" ,
180+ "collections.abc.MutableMapping" ,
181+ "collections.abc.MutableSet" ,
182+ "enum.Enum" ,
183+ "graphql.execution.build_field_plan.FieldGroup" ,
184+ "graphql.execution.build_field_plan.FieldPlan" ,
185+ "graphql.execution.collect_fields.DeferUsage" ,
186+ "graphql.execution.execute.StreamArguments" ,
187+ "graphql.execution.execute.StreamUsage" ,
188+ "graphql.execution.map_async_iterable.map_async_iterable" ,
189+ "graphql.execution.incremental_publisher.CompletedResult" ,
190+ "graphql.execution.incremental_publisher.DeferredFragmentRecord" ,
191+ "graphql.execution.incremental_publisher.DeferredGroupedFieldSetRecord" ,
192+ "graphql.execution.incremental_publisher.FormattedCompletedResult" ,
193+ "graphql.execution.incremental_publisher.FormattedPendingResult" ,
194+ "graphql.execution.incremental_publisher.IncrementalPublisher" ,
195+ "graphql.execution.incremental_publisher.InitialResultRecord" ,
196+ "graphql.execution.incremental_publisher.PendingResult" ,
197+ "graphql.execution.incremental_publisher.StreamItemsRecord" ,
198+ "graphql.execution.incremental_publisher.StreamRecord" ,
199+ "graphql.execution.Middleware" ,
200+ "graphql.language.lexer.EscapeSequence" ,
201+ "graphql.language.visitor.EnterLeaveVisitor" ,
202+ "graphql.pyutils.ref_map.K" ,
203+ "graphql.pyutils.ref_map.V" ,
204+ "graphql.type.definition.GT_co" ,
205+ "graphql.type.definition.GNT_co" ,
206+ "graphql.type.definition.TContext" ,
207+ "graphql.type.schema.InterfaceImplementations" ,
208+ "graphql.validation.validation_context.VariableUsage" ,
209+ "graphql.validation.rules.known_argument_names.KnownArgumentNamesOnDirectivesRule" ,
210+ "graphql.validation.rules.provided_required_arguments.ProvidedRequiredArgumentsOnDirectivesRule" ,
211+ }
214212
215213ignore_references .update (__builtins__ .keys ())
216214
@@ -228,10 +226,12 @@ def on_missing_reference(app, env, node, contnode):
228226 name = target .rsplit ("." , 1 )[- 1 ]
229227 if name in ("GT" , "GNT" , "KT" , "T" , "VT" ):
230228 return contnode
231- if typ == "obj" :
232- if target .startswith ("typing." ):
233- if name in ("Any" , "Optional" , "Union" ):
234- return contnode
229+ if (
230+ typ == "obj"
231+ and target .startswith ("typing." )
232+ and name in ("Any" , "Optional" , "Union" )
233+ ):
234+ return contnode
235235 if typ != "class" :
236236 return None
237237 if "." in target : # maybe too specific
0 commit comments