Skip to content

Commit d971fbb

Browse files
committed
Update to use partial instead of lambda function
1 parent e7b5358 commit d971fbb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graphene/core/classtypes/uniontype.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from functools import partial
2+
13
import six
24
from graphql.core.type import GraphQLUnionType
35

@@ -35,6 +37,6 @@ def internal_type(cls, schema):
3537
return GraphQLUnionType(
3638
cls._meta.type_name,
3739
types=list(map(schema.T, cls._meta.types)),
38-
resolve_type=lambda instance, info: cls._resolve_type(schema, instance, info),
40+
resolve_type=partial(cls._resolve_type, schema),
3941
description=cls._meta.description,
4042
)

0 commit comments

Comments
 (0)