Improve dependencies typing

This commit is contained in:
François Voron
2022-01-15 11:08:49 +01:00
parent c43303c386
commit 533504634f
7 changed files with 24 additions and 11 deletions

7
fastapi_users/types.py Normal file
View File

@ -0,0 +1,7 @@
from typing import Callable, Coroutine, TypeVar, Union
RETURN_TYPE = TypeVar("RETURN_TYPE")
DependencyCallable = Callable[
..., Union[RETURN_TYPE, Coroutine[None, None, RETURN_TYPE]]
]