Pycharm cannot resolve type from dependency injection with wiring.Provide

Answered

E.g. 

```

class Container:

    publisher = providers.Singletons(get_publisher)

Then

publisher=Provide[Container.publisher]

```

 

Expected:

publisher can be resolved based on the provider get_publisher.

Current behavior:

Cannot resolve the type of publisher. When you manually annotate to the publisher type, it complains `Expected type Publisher, got Type[Provide] instead`

0
1 comment

Hi Popoxee , this issue requires thorough investigation, please create an issue on YouTrack and attach all relevant information (including a minimal project sample) for quicker resolution.

0

Post is closed for comments.