Update stubs

This commit is contained in:
Trinh Anh Ngoc
2022-11-02 11:05:38 +07:00
parent 78984b9aab
commit d1acead45b

View File

@@ -1,6 +1,5 @@
from collections import defaultdict
from typing import Any, Callable, Collection, Generator, Iterable, Iterator, KeysView, Literal, Mapping, Optional, \
TypeVar, Union
from typing import Any, Callable, Collection, Generator, Iterable, Iterator, KeysView, Literal, Mapping, Optional, Sequence, TypeVar, Union
from weakref import WeakSet
from .fields import Field
@@ -26,10 +25,10 @@ class Meta(type):
def attrsetter(attr, value) -> Callable[[_T], _T]: ...
def propagate(method1: Callable, method2: _CallableT) -> _CallableT: ...
def constrains(*args: str) -> Callable[[_T], _T]: ...
def constrains(*args: str | Callable[[_ModelT], Sequence[str]]) -> Callable[[_T], _T]: ...
def ondelete(*, at_uninstall: bool) -> Callable[[_T], _T]: ...
def onchange(*args: str) -> Callable[[_T], _T]: ...
def depends(*args: Union[str, Callable]) -> Callable[[_T], _T]: ...
def depends(*args: str | Callable[[_ModelT], Sequence[str]]) -> Callable[[_T], _T]: ...
def depends_context(*args: str) -> Callable[[_T], _T]: ...
def returns(model: str | None, downgrade: Callable | None = ..., upgrade: Callable | None = ...) -> Callable[[_T], _T]: ...
def downgrade(method: Callable, value, self, args, kwargs): ...