python-dependency-injector
python-dependency-injector copied to clipboard
injection config and usage let IDE smart recognised
trafficstars
is it possible to let IDE recognise the config parameter?
for example, when we register this application.config.aws.access_key_id.from_env("AWS_ACCESS_KEY_ID") we inject config to one service
in the service, if want to use it we need to use config.aws.access_key_id to access it, but the IDE can only recognise it as string, we cannot use some functions such as find usage function
@xinatcg hi!
I think in this case the only workaround that will help you is typing.cast. In this case, you will be fully responsible for the fact that you may indicate the wrong data type there