extract schemas automatically from views

This commit is contained in:
arcanis committed 2023-04-06 00:24:39 +03:00
1 parent 8f4a2547e8
commit e08ab2db10
15 files changed
+84 -75

No files matched your search

@@ -213,9 +213,9 @@ class Configuration(configparser.RawConfigParser):
if self.has_section(full_section):
return full_section, section
# okay lets just use section as type
if not self.has_section(section):
raise configparser.NoSectionError(section)
return section, section
if self.has_section(section):
return section, section
raise configparser.NoSectionError(section)
def load(self, path: Path) -> None:
"""
+1 -1
View File
@@ -173,7 +173,7 @@ class BaseView(View, CorsViewMixin):
Raises:
HTTPMethodNotAllowed: in case if there is no GET method implemented
"""
get_method: Optional[Callable[[], Awaitable[StreamResponse]]] = getattr(self, "get", None)
get_method: Optional[Callable[..., Awaitable[StreamResponse]]] = getattr(self, "get", None)
# using if/else in order to suppress mypy warning which doesn't know that
# ``_raise_allowed_methods`` raises exception
if get_method is not None: