mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-02 12:21:53 +08:00
Improve dependencies typing
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Generic
|
||||
from typing import Any, Generic
|
||||
|
||||
from fastapi import Response
|
||||
|
||||
@ -11,6 +11,7 @@ from fastapi_users.authentication.transport import (
|
||||
Transport,
|
||||
TransportLogoutNotSupportedError,
|
||||
)
|
||||
from fastapi_users.types import DependencyCallable
|
||||
|
||||
|
||||
class AuthenticationBackend(Generic[models.UC, models.UD]):
|
||||
@ -32,7 +33,7 @@ class AuthenticationBackend(Generic[models.UC, models.UD]):
|
||||
self,
|
||||
name: str,
|
||||
transport: Transport,
|
||||
get_strategy: Callable[..., Strategy[models.UC, models.UD]],
|
||||
get_strategy: DependencyCallable[Strategy[models.UC, models.UD]],
|
||||
):
|
||||
self.name = name
|
||||
self.transport = transport
|
||||
|
||||
Reference in New Issue
Block a user