Injecting dependencies from parent class #23
Answered
by
Aegdesil
mateuszzebek
asked this question in
Q&A
-
Is there any way to inject dependencies that are annotated only in parent class? As in example showed below
|
Beta Was this translation helpful? Give feedback.
Answered by
Aegdesil
Nov 17, 2021
Replies: 1 comment 4 replies
-
There is no way to do that as there is no way to know which argument from the child class is mapped to which argument in the parent class (you could be manipulating the kwargs before calling the parent constructor). You have 3 solutions:
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
alexmick
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no way to do that as there is no way to know which argument from the child class is mapped to which argument in the parent class (you could be manipulating the kwargs before calling the parent constructor).
You have 3 solutions: