INNER CODE UNIT · Python
f
hynek/svcs · typing_tests/base.py:189
def f(
fn: Callable[[svcs.Container], str],
afn: Callable[[svcs.Container], Awaitable[str]],
) -> None:
"""
A slightly convoluted check for ty until we have a way to assert.
"""
f(fn, afn)
assert_type(svcs.autowire(P), Callable[[svcs.Container], P])
assert_type(svcs.aautowire(P), Callable[[svcs.Container], Awaitable[P]])
reg.register_factory(str, fn)
reg.register_factory(str, afn)
reg.register_factory(P, svcs.autowire(P))