code reformatting

This commit is contained in:
Vincent Maillol
2021-07-11 07:31:37 +02:00
parent 08ab4d2610
commit 89a22f2fcd
9 changed files with 33 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
from .view import PydanticView
__version__ = "1.9.0"
__version__ = "1.9.1"
__all__ = ("PydanticView", "__version__")

View File

@@ -305,7 +305,10 @@ class Components:
class OpenApiSpec3:
def __init__(self):
self._spec = {"openapi": "3.0.0", "info": {"version": "1.0.0", "title": "Aiohttp pydantic application"}}
self._spec = {
"openapi": "3.0.0",
"info": {"version": "1.0.0", "title": "Aiohttp pydantic application"},
}
@property
def info(self) -> Info:

View File

@@ -147,7 +147,11 @@ def _add_http_method_to_oas(
)
def generate_oas(apps: List[Application], version_spec: Optional[str] = None, title_spec: Optional[str] = None) -> dict:
def generate_oas(
apps: List[Application],
version_spec: Optional[str] = None,
title_spec: Optional[str] = None,
) -> dict:
"""
Generate and return Open Api Specification from PydanticView in application.
"""

View File

@@ -60,7 +60,9 @@ class PydanticView(AbstractView):
def raise_not_allowed(self) -> None:
warnings.warn(
"PydanticView.raise_not_allowed is deprecated and renamed _raise_allowed_methods",
DeprecationWarning, stacklevel=2)
DeprecationWarning,
stacklevel=2,
)
self._raise_allowed_methods()
@staticmethod