Fix tuple types in sphinx docstrings

This commit is contained in:
Cristi Vîjdea
2018-12-21 18:18:58 +02:00
parent bfd13668cc
commit dd5965fa92
8 changed files with 58 additions and 52 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ class FieldInspector(BaseInspector):
- :class:`.Schema` if `swagger_object_type` is :class:`.Schema`
- :class:`.Items` if `swagger_object_type` is :class:`.Parameter` or :class:`.Items`
:rtype: tuple[callable,(type[openapi.Schema] or type[openapi.Items])]
:rtype: (function,type[openapi.Schema] or type[openapi.Items])
"""
assert swagger_object_type in (openapi.Schema, openapi.Parameter, openapi.Items)
assert not isinstance(field, openapi.SwaggerDict), "passed field is already a SwaggerDict object"
+2 -2
View File
@@ -344,7 +344,7 @@ class SwaggerAutoSchema(ViewInspector):
:param description: the full description to be analyzed
:return: summary and description
:rtype: tuple[str,str]
:rtype: (str,str)
"""
# https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings
summary = None
@@ -362,7 +362,7 @@ class SwaggerAutoSchema(ViewInspector):
"""Return an operation summary and description determined from the view's docstring.
:return: summary and description
:rtype: tuple[str,str]
:rtype: (str,str)
"""
description = self.overrides.get('operation_description', None)
summary = self.overrides.get('operation_summary', None)