INNER CODE UNIT · Python

fn

hynek/svcs · typing_tests/base.py:176

def fn(a: str, /, b: int, *, c: bool) -> str:
    return "fn"


@svcs.aautowire
async def afn(a: str, /, b: int, *, c: bool) -> str:
    return "afn"


assert_type(fn, Callable[[svcs.Container], str])  # ty: ignore[type-assertion-failure]  -- https://github.com/astral-sh/ty/issues/3697
assert_type(afn, Callable[[svcs.Container], Awaitable[str]])  # ty: ignore[type-assertion-failure]


def f(
    fn: Callable[[svcs.Container], str],
    afn: Callable[[svcs.Container], Awaitable[str]],
) -> None:
    """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…