mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-28 21:29:56 +00:00
add __all__ attribute
This commit is contained in:
@ -36,6 +36,9 @@ from ahriman.models.user_identity import UserIdentity
|
||||
from ahriman.web.middlewares import HandlerType, MiddlewareType
|
||||
|
||||
|
||||
__all__ = ["AuthorizationPolicy", "auth_handler", "setup_auth"]
|
||||
|
||||
|
||||
class AuthorizationPolicy(aiohttp_security.AbstractAuthorizationPolicy): # type: ignore
|
||||
"""
|
||||
authorization policy implementation
|
||||
|
@ -25,6 +25,9 @@ from logging import Logger
|
||||
from ahriman.web.middlewares import HandlerType, MiddlewareType
|
||||
|
||||
|
||||
__all__ = ["exception_handler"]
|
||||
|
||||
|
||||
def exception_handler(logger: Logger) -> MiddlewareType:
|
||||
"""
|
||||
exception handler middleware. Just log any exception (except for client ones)
|
||||
|
@ -33,6 +33,9 @@ from ahriman.web.views.user.login import LoginView
|
||||
from ahriman.web.views.user.logout import LogoutView
|
||||
|
||||
|
||||
__all__ = ["setup_routes"]
|
||||
|
||||
|
||||
def setup_routes(application: Application, static_path: Path) -> None:
|
||||
"""
|
||||
setup all defined routes
|
||||
|
@ -33,6 +33,9 @@ from ahriman.web.middlewares.exception_handler import exception_handler
|
||||
from ahriman.web.routes import setup_routes
|
||||
|
||||
|
||||
__all__ = ["on_shutdown", "on_startup", "run_server", "setup_service"]
|
||||
|
||||
|
||||
async def on_shutdown(application: web.Application) -> None:
|
||||
"""
|
||||
web application shutdown handler
|
||||
|
Reference in New Issue
Block a user