mirror of
https://github.com/graphql-python/graphene.git
synced 2025-05-03 07:53:41 +03:00
Merge 2feabacf4b
into 8290326308
This commit is contained in:
commit
78546949f8
|
@ -9,6 +9,7 @@ from .structures import NonNull
|
|||
from .unmountedtype import UnmountedType
|
||||
from .utils import get_type
|
||||
from ..utils.deprecated import warn_deprecation
|
||||
from ..utils.trim_docstring import trim_docstring
|
||||
|
||||
base_type = type
|
||||
|
||||
|
@ -109,7 +110,7 @@ class Field(MountedType):
|
|||
resolver = partial(source_resolver, source)
|
||||
self.resolver = resolver
|
||||
self.deprecation_reason = deprecation_reason
|
||||
self.description = description
|
||||
self.description = trim_docstring(description)
|
||||
self.default_value = default_value
|
||||
|
||||
@property
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user