mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-26 04:25:46 +08:00
Improve dependencies typing
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
from typing import Callable, Generic, Optional, Type
|
||||
from typing import Generic, Optional, Type
|
||||
|
||||
from pydantic import UUID4
|
||||
|
||||
from fastapi_users.models import UD
|
||||
from fastapi_users.types import DependencyCallable
|
||||
|
||||
|
||||
class BaseUserDatabase(Generic[UD]):
|
||||
@ -42,4 +43,4 @@ class BaseUserDatabase(Generic[UD]):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
UserDatabaseDependency = Callable[..., BaseUserDatabase[UD]]
|
||||
UserDatabaseDependency = DependencyCallable[BaseUserDatabase[UD]]
|
||||
|
Reference in New Issue
Block a user