Improve type hints (#1401)

* Add type parameters to `AuthenticationBackend`

* add more type-hints
This commit is contained in:
Alexander Zinov
2024-07-14 17:04:13 +04:00
committed by GitHub
parent 6ac64ad293
commit abfa9a1c47
8 changed files with 25 additions and 25 deletions

View File

@ -11,9 +11,9 @@ from fastapi_users.router.common import ErrorCode, ErrorModel
def get_auth_router(
backend: AuthenticationBackend,
backend: AuthenticationBackend[models.UP, models.ID],
get_user_manager: UserManagerDependency[models.UP, models.ID],
authenticator: Authenticator,
authenticator: Authenticator[models.UP, models.ID],
requires_verification: bool = False,
) -> APIRouter:
"""Generate a router with login/logout routes for an authentication backend."""