From f09248f04089a64c6b4029e4944db932118f87a0 Mon Sep 17 00:00:00 2001 From: Abhinand C Date: Fri, 3 Mar 2023 00:21:27 +0530 Subject: [PATCH] style: Fixed lint errors, and black formatting --- src/graphql/utilities/coerce_input_value.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/graphql/utilities/coerce_input_value.py b/src/graphql/utilities/coerce_input_value.py index 4d795f7b..6017769c 100644 --- a/src/graphql/utilities/coerce_input_value.py +++ b/src/graphql/utilities/coerce_input_value.py @@ -70,14 +70,18 @@ def coerce_input_value( if is_iterable(input_value): coerced_list: List[Any] = [] append_item = coerced_list.append - is_nested_list = bool(is_list_type(item_type) and len(input_value) > 1) + is_nested_list = bool( + is_list_type(item_type) and len(tuple(input_value)) > 1 + ) for index, item_value in enumerate(input_value): if is_nested_list and not is_iterable(item_value): - # All input values should be iterable for multivalued nested list types + # Input values should be iterable for multivalued nested list type on_error( path.as_list() if path else Path(path, index, None).as_list(), item_value, - GraphQLError(f"Expected type '{inspect(item_type)}' to be a list."), + GraphQLError( + f"Expected type '{inspect(item_type)}' to be a list." + ), ) append_item( coerce_input_value(