From 2feabacf4ba39bda46dd71a408e1d60cfac54acc Mon Sep 17 00:00:00 2001 From: Firas K <3097061+firaskafri@users.noreply.github.com> Date: Sat, 7 Jan 2023 00:55:36 +0300 Subject: [PATCH] remove leading whitespaces in multi-line descriptions for UnmountedType --- graphene/types/unmountedtype.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/graphene/types/unmountedtype.py b/graphene/types/unmountedtype.py index 83a6afef..dd6525df 100644 --- a/graphene/types/unmountedtype.py +++ b/graphene/types/unmountedtype.py @@ -1,5 +1,5 @@ from ..utils.orderedtype import OrderedType - +from ..utils.trim_docstring import trim_docstring class UnmountedType(OrderedType): """ @@ -43,7 +43,9 @@ class UnmountedType(OrderedType): super(UnmountedType, self).__init__() self.args = args self.kwargs = kwargs - + if 'description' in self.kwargs: + self.kwargs['description'] = trim_docstring(self.kwargs['description']) + def get_type(self): """ This function is called when the UnmountedType instance