From d971fbb4dc3b69e012b212cd54b6e8511571e1f5 Mon Sep 17 00:00:00 2001 From: Markus Padourek Date: Mon, 1 Feb 2016 18:50:30 +0000 Subject: [PATCH] Update to use partial instead of lambda function --- graphene/core/classtypes/uniontype.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/graphene/core/classtypes/uniontype.py b/graphene/core/classtypes/uniontype.py index 37a8d14a..24c3d441 100644 --- a/graphene/core/classtypes/uniontype.py +++ b/graphene/core/classtypes/uniontype.py @@ -1,3 +1,5 @@ +from functools import partial + import six from graphql.core.type import GraphQLUnionType @@ -35,6 +37,6 @@ class UnionType(six.with_metaclass(UnionTypeMeta, FieldsClassType)): return GraphQLUnionType( cls._meta.type_name, types=list(map(schema.T, cls._meta.types)), - resolve_type=lambda instance, info: cls._resolve_type(schema, instance, info), + resolve_type=partial(cls._resolve_type, schema), description=cls._meta.description, )