Skip to content

Commit 62ce8e9

Browse files
committed
TypeInfo: use explicit type for get_field_def arg
Replicates graphql/graphql-js@4adac42
1 parent 4eca7b7 commit 62ce8e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/graphql/utilities/type_info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
__all__ = ["TypeInfo", "TypeInfoVisitor"]
5050

5151

52-
GetFieldDefType = Callable[
52+
GetFieldDefFn = Callable[
5353
[GraphQLSchema, GraphQLType, FieldNode], Optional[GraphQLField]
5454
]
5555

@@ -67,7 +67,7 @@ def __init__(
6767
self,
6868
schema: GraphQLSchema,
6969
initial_type: Optional[GraphQLType] = None,
70-
get_field_def_fn: Optional[GetFieldDefType] = None,
70+
get_field_def_fn: Optional[GetFieldDefFn] = None,
7171
) -> None:
7272
"""Initialize the TypeInfo for the given GraphQL schema.
7373
@@ -85,7 +85,7 @@ def __init__(
8585
self._directive: Optional[GraphQLDirective] = None
8686
self._argument: Optional[GraphQLArgument] = None
8787
self._enum_value: Optional[GraphQLEnumValue] = None
88-
self._get_field_def = get_field_def_fn or get_field_def
88+
self._get_field_def: GetFieldDefFn = get_field_def_fn or get_field_def
8989
if initial_type:
9090
if is_input_type(initial_type):
9191
self._input_type_stack.append(cast(GraphQLInputType, initial_type))

0 commit comments

Comments
 (0)