mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-10-10 22:06:43 +03:00
Add stubs for the extensions
This commit is contained in:
parent
ce5d975126
commit
d600c6cde4
0
src/dependency_injector/ext/__init__.pyi
Normal file
0
src/dependency_injector/ext/__init__.pyi
Normal file
23
src/dependency_injector/ext/aiohttp.pyi
Normal file
23
src/dependency_injector/ext/aiohttp.pyi
Normal file
|
@ -0,0 +1,23 @@
|
|||
from typing import Awaitable as _Awaitable
|
||||
|
||||
from dependency_injector import providers
|
||||
|
||||
|
||||
class Application(providers.Singleton): ...
|
||||
|
||||
|
||||
class Extension(providers.Singleton): ...
|
||||
|
||||
|
||||
class Middleware(providers.DelegatedCallable): ...
|
||||
|
||||
|
||||
class MiddlewareFactory(providers.Factory): ...
|
||||
|
||||
|
||||
class View(providers.Callable):
|
||||
def as_view(self) -> _Awaitable: ...
|
||||
|
||||
|
||||
class ClassBasedView(providers.Factory):
|
||||
def as_view(self) -> _Awaitable: ...
|
24
src/dependency_injector/ext/flask.pyi
Normal file
24
src/dependency_injector/ext/flask.pyi
Normal file
|
@ -0,0 +1,24 @@
|
|||
from typing import Union, Optional, Callable as _Callable, Any
|
||||
|
||||
from flask import request as flask_request
|
||||
from dependency_injector import providers
|
||||
|
||||
|
||||
request: providers.Object[flask_request]
|
||||
|
||||
|
||||
class Application(providers.Singleton): ...
|
||||
|
||||
|
||||
class Extension(providers.Singleton): ...
|
||||
|
||||
|
||||
class View(providers.Callable):
|
||||
def as_view(self) -> _Callable[..., Any]: ...
|
||||
|
||||
|
||||
class ClassBasedView(providers.Factory):
|
||||
def as_view(self, name: str) -> _Callable[..., Any]: ...
|
||||
|
||||
|
||||
def as_view(provider: Union[View, ClassBasedView], name: Optional[str] = None) -> _Callable[..., Any]: ...
|
Loading…
Reference in New Issue
Block a user