Roman Mogylatov
Roman Mogylatov
Hi @chbndrhnns , Thanks for sharing the use case. Yes, I think you can be something like: ```python class Repositories(containers.DeclarativeContainer): adapters: Adapters = containers.DependenciesContainer(instanceof= Adapters) repo = providers.Factory( Repo, adapter=adapters.db_adapter...
Awesome! Don't know yet how to implement it, but that does look cool. Thanks for bringing this up!
Hi @jack-michaud , yeah, mypy does not detect this. I don’t know if there is a way to make it do that. Seems like Pyright does similar checking, but as...
I see you point totally reasonable but I’m not yet sure how to implement this.
Hi @jack-michaud. I never tested Dependency Injector with Pyright. Thanks for bringing up the issue. I don’t know yet if there is a way to get these errors fixed.
Thanks for the feedback @artem30801 and @jochenparm . Will think on improving this.
Hi @al-stefanitsky-mozdor , Thanks for bringing up the idea. I tried to stay away from the string identifiers the last couple of years, but this has changed in the past...
Hi @AshurovRustam , right now it's not possible. I'm not sure if that's gonna work, but I could try to implement this. As a temporary solution you can use `Provider`...
I didn't get to these experiments yet, my apologies. I still believe that the closest solution to this problem should be in using contextvars + middleware + special provider for...
Hi @torotil , take a look at https://python-dependency-injector.ets-labs.org/providers/configuration.html#loading-from-a-yaml-file