Closed nrbnlulu closed 6 months ago
Example:
from __future__ import annotations from dataclasses import dataclass @dataclass class B: a: A def get_b(a: A) -> B: return B(a) class A: ... cont = aioinject.Container() cont.register( aioinject.Object(A()), aioinject.Singleton(get_b) )
Example: