WithParents mypy: Type application only supported for generic classes · Issue #443 · reagento/dishka · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromtypingimportProtocolfromdishkaimportProvider, Scope, WithParents, make_container, provideclassGateway(Protocol): ...
classImplGateway(Gateway): ...
classMyProvider(Provider):
scope=Scope.APPgateway=provide(WithParents[ImplGateway])
# src/loyalty/application/__init__.py: note: In class "MyProvider":# src/loyalty/application/__init__.py:14:23: error: Type application is only supported for generic classes [misc]container=make_container(MyProvider())
gateway=container.get(Gateway)
print(gateway) # <__main__.ImplGateway object at 0x7a2661497a10>
The text was updated successfully, but these errors were encountered:
MRE
The text was updated successfully, but these errors were encountered: