dishka
dishka copied to clipboard
FromComponent type hints
@provide(scope=Scope.APP)
def provide_database_connection_options(
self,
config: Annotated[DatabaseConfig, FromComponent(Component.SHARED)],
) -> DatabaseConnectionOptions:
return DatabaseConnectionOptions(dsn=config.DATABASE_DSN, schema=self._schema)
something like that will raise IDE type warnings
Which IDE are you using? Looks like a bug in Pycharm.
Which IDE are you using? Looks like a bug in Pycharm.
Pycharm, yeah
Done in #233