mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-14 22:45:47 +00:00
extract schemas automatically from views
This commit is contained in:
@ -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:
|
||||
"""
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user