mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-15 11:11:16 +08:00
Add AsyncIterator to the DependencyCallable type (#1235)
* add AsyncIterator to the DependencyCallable type * fix linting issues
This commit is contained in:
@ -1,4 +1,12 @@
|
|||||||
from typing import AsyncGenerator, Callable, Coroutine, Generator, TypeVar, Union
|
from typing import (
|
||||||
|
AsyncGenerator,
|
||||||
|
AsyncIterator,
|
||||||
|
Callable,
|
||||||
|
Coroutine,
|
||||||
|
Generator,
|
||||||
|
TypeVar,
|
||||||
|
Union,
|
||||||
|
)
|
||||||
|
|
||||||
RETURN_TYPE = TypeVar("RETURN_TYPE")
|
RETURN_TYPE = TypeVar("RETURN_TYPE")
|
||||||
|
|
||||||
@ -9,5 +17,6 @@ DependencyCallable = Callable[
|
|||||||
Coroutine[None, None, RETURN_TYPE],
|
Coroutine[None, None, RETURN_TYPE],
|
||||||
AsyncGenerator[RETURN_TYPE, None],
|
AsyncGenerator[RETURN_TYPE, None],
|
||||||
Generator[RETURN_TYPE, None, None],
|
Generator[RETURN_TYPE, None, None],
|
||||||
|
AsyncIterator[RETURN_TYPE],
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user