code reformatting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from .view import PydanticView
|
||||
|
||||
__version__ = "1.9.0"
|
||||
__version__ = "1.9.1"
|
||||
|
||||
__all__ = ("PydanticView", "__version__")
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user