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

@ -29,7 +29,7 @@ def generate_state_token(
def get_oauth_router(
oauth_client: BaseOAuth2,
backend: AuthenticationBackend,
backend: AuthenticationBackend[models.UP, models.ID],
get_user_manager: UserManagerDependency[models.UP, models.ID],
state_secret: SecretType,
redirect_url: Optional[str] = None,
@ -156,7 +156,7 @@ def get_oauth_router(
def get_oauth_associate_router(
oauth_client: BaseOAuth2,
authenticator: Authenticator,
authenticator: Authenticator[models.UP, models.ID],
get_user_manager: UserManagerDependency[models.UP, models.ID],
user_schema: Type[schemas.U],
state_secret: SecretType,