Lancetnik / FastDepends

FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. Async and sync modes are both supported.
https://lancetnik.github.io/FastDepends/
MIT License
294 stars 11 forks source link

`Iterator[...]` generator return type support #12

Closed Lancetnik closed 9 months ago

Lancetnik commented 1 year ago

Correct python annotation is broker in a FastDepends case:

from typing import Iterator
from fast_stream import inject

@inject
def func() -> Iterator[int]:
    for i in range(10):
        return i