class A:
...
class B:
def __init__(self, a: A):
print("a", a)
class X(A):
...
i = Injector(
bindings=[ClassBinding(A, X)],
options=InjectorOptions(auto_bindings=True)
)
b = i.inject(B)
a <__main__.A object at 0x0000020DF1469B80> # I expected an instance of X
Discussed in #17
Originally posted by evermediocre August 15, 2021
Is there a way to NOT ignore current bindings when
auto_bindings=True?Output: