mirror of
https://github.com/correl/tornado-openapi3.git
synced 2025-04-09 17:00:12 -09: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 os
|
||||||
import sys
|
import sys
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
|
||||||
|
sys.path.insert(0, os.path.abspath(".."))
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
project = 'Tornado OpenAPI 3'
|
project = "Tornado OpenAPI 3"
|
||||||
copyright = '2021, Correl Roush'
|
copyright = "2021, Correl Roush"
|
||||||
author = 'Correl Roush'
|
author = "Correl Roush"
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
@ -31,15 +32,15 @@ extensions = [
|
||||||
"sphinx_rtd_theme",
|
"sphinx_rtd_theme",
|
||||||
]
|
]
|
||||||
|
|
||||||
autodoc_member_order = 'groupwise'
|
autodoc_member_order = "groupwise"
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# 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
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
# This pattern also affects html_static_path and html_extra_path.
|
# 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 -------------------------------------------------
|
# -- 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
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# 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,
|
# 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,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# 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:
|
class TornadoRequestFactory:
|
||||||
"""Factory for converting Tornado requests to OpenAPI request objects."""
|
"""Factory for converting Tornado requests to OpenAPI request objects."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, request: Union[HTTPRequest, HTTPServerRequest]) -> OpenAPIRequest:
|
def create(cls, request: Union[HTTPRequest, HTTPServerRequest]) -> OpenAPIRequest:
|
||||||
"""Creates an OpenAPI request from Tornado request objects.
|
"""Creates an OpenAPI request from Tornado request objects.
|
||||||
|
@ -63,6 +64,7 @@ class TornadoRequestFactory:
|
||||||
|
|
||||||
class RequestValidator(validators.RequestValidator):
|
class RequestValidator(validators.RequestValidator):
|
||||||
"""Validator for Tornado HTTP Requests."""
|
"""Validator for Tornado HTTP Requests."""
|
||||||
|
|
||||||
def validate(
|
def validate(
|
||||||
self, request: Union[HTTPRequest, HTTPServerRequest]
|
self, request: Union[HTTPRequest, HTTPServerRequest]
|
||||||
) -> RequestValidationResult:
|
) -> RequestValidationResult:
|
||||||
|
|
|
@ -11,6 +11,7 @@ from .util import parse_mimetype
|
||||||
|
|
||||||
class TornadoResponseFactory:
|
class TornadoResponseFactory:
|
||||||
"""Factory for converting Tornado responses to OpenAPI response objects."""
|
"""Factory for converting Tornado responses to OpenAPI response objects."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, response: HTTPResponse) -> OpenAPIResponse:
|
def create(cls, response: HTTPResponse) -> OpenAPIResponse:
|
||||||
"""Creates an OpenAPI response from Tornado response objects."""
|
"""Creates an OpenAPI response from Tornado response objects."""
|
||||||
|
@ -24,6 +25,7 @@ class TornadoResponseFactory:
|
||||||
|
|
||||||
class ResponseValidator(validators.ResponseValidator):
|
class ResponseValidator(validators.ResponseValidator):
|
||||||
"""Validator for Tornado HTTP Responses."""
|
"""Validator for Tornado HTTP Responses."""
|
||||||
|
|
||||||
def validate(self, response: HTTPResponse) -> ResponseValidationResult:
|
def validate(self, response: HTTPResponse) -> ResponseValidationResult:
|
||||||
"""Validate a Tornado HTTP response object."""
|
"""Validate a Tornado HTTP response object."""
|
||||||
return super().validate(
|
return super().validate(
|
||||||
|
|
Loading…
Add table
Reference in a new issue