mirror of
https://github.com/correl/tornado-openapi3.git
synced 2024-11-21 19:18:40 +00:00
Blacken code
This commit is contained in:
parent
12813757d1
commit
16250d8f90
3 changed files with 14 additions and 9 deletions
19
docs/conf.py
19
docs/conf.py
|
@ -12,13 +12,14 @@
|
|||
#
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'Tornado OpenAPI 3'
|
||||
copyright = '2021, Correl Roush'
|
||||
author = 'Correl Roush'
|
||||
project = "Tornado OpenAPI 3"
|
||||
copyright = "2021, Correl Roush"
|
||||
author = "Correl Roush"
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
@ -31,15 +32,15 @@ extensions = [
|
|||
"sphinx_rtd_theme",
|
||||
]
|
||||
|
||||
autodoc_member_order = 'groupwise'
|
||||
autodoc_member_order = "groupwise"
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
@ -47,9 +48,9 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
html_static_path = ["_static"]
|
||||
|
|
|
@ -17,6 +17,7 @@ from .util import parse_mimetype
|
|||
|
||||
class TornadoRequestFactory:
|
||||
"""Factory for converting Tornado requests to OpenAPI request objects."""
|
||||
|
||||
@classmethod
|
||||
def create(cls, request: Union[HTTPRequest, HTTPServerRequest]) -> OpenAPIRequest:
|
||||
"""Creates an OpenAPI request from Tornado request objects.
|
||||
|
@ -63,6 +64,7 @@ class TornadoRequestFactory:
|
|||
|
||||
class RequestValidator(validators.RequestValidator):
|
||||
"""Validator for Tornado HTTP Requests."""
|
||||
|
||||
def validate(
|
||||
self, request: Union[HTTPRequest, HTTPServerRequest]
|
||||
) -> RequestValidationResult:
|
||||
|
|
|
@ -11,6 +11,7 @@ from .util import parse_mimetype
|
|||
|
||||
class TornadoResponseFactory:
|
||||
"""Factory for converting Tornado responses to OpenAPI response objects."""
|
||||
|
||||
@classmethod
|
||||
def create(cls, response: HTTPResponse) -> OpenAPIResponse:
|
||||
"""Creates an OpenAPI response from Tornado response objects."""
|
||||
|
@ -24,6 +25,7 @@ class TornadoResponseFactory:
|
|||
|
||||
class ResponseValidator(validators.ResponseValidator):
|
||||
"""Validator for Tornado HTTP Responses."""
|
||||
|
||||
def validate(self, response: HTTPResponse) -> ResponseValidationResult:
|
||||
"""Validate a Tornado HTTP response object."""
|
||||
return super().validate(
|
||||
|
|
Loading…
Reference in a new issue