Closed
Description
When referencing a singleton via foo.provided.bar
, we lose type safety because provided
always resolves to the ProvidedInstance
rather than the specific type of the dependency.
settings = providers.Singleton(Settings)
identity_container = providers.Container(
IdentityContainer,
base_url=settings.provided.IDENTITY_SERVICE_BASE_URL,
)
Expected
settings.provided
resolves to Settings
Actual
settings.provided
resolves to ProvidedInstance
This seems like an easy change to make -- Is there any reason this wouldn't work if I opened a PR?
Metadata
Metadata
Assignees
Labels
No labels