Files
Justin Thomas b1bce5d765 Add AsyncIterator to the DependencyCallable type (#1235)
* add AsyncIterator to the DependencyCallable type

* fix linting issues
2023-06-23 10:38:00 +02:00

23 lines
417 B
Python

from typing import (
AsyncGenerator,
AsyncIterator,
Callable,
Coroutine,
Generator,
TypeVar,
Union,
)
RETURN_TYPE = TypeVar("RETURN_TYPE")
DependencyCallable = Callable[
...,
Union[
RETURN_TYPE,
Coroutine[None, None, RETURN_TYPE],
AsyncGenerator[RETURN_TYPE, None],
Generator[RETURN_TYPE, None, None],
AsyncIterator[RETURN_TYPE],
],
]