async def main(cowsay: str = aiodine.depends(cowsay)) -> str: await io() return cowsay
async def cowsay(message: str = aiodine.depends(moo)) -> typing.AsyncIterator[str]: await io() yield f"Cow says: {message}" await io() await event.set()
async def cowsay(message: str = aiodine.depends(moo)) -> str: await io() return f"Cow says: {message}"
async def say(who: str, what: str = aiodine.depends(Moo)) -> str: await io() if should_raise: raise ValueError return f"{who} says {what}"
async def say(who: str, what: str = aiodine.depends(moo)) -> str: # type: ignore await io() return f"{who} says {what}"
async def main(db: Database = aiodine.depends(get_db)) -> None: rows = await db.fetchall() print("Rows:", rows)
async def cowsay(what: str = aiodine.depends(moo)) -> None: print(f"Going to say {what!r}...") print(f"Cow says {what}")
def test_dependable_repr(func: typing.Callable, output: str) -> None: dependable = aiodine.depends(func) assert repr(dependable) == output