Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-12-04 22:02:35 +07:00
parent 4605f7ed56
commit fd43bca154
2 changed files with 6 additions and 1 deletions

View File

@@ -171,7 +171,9 @@ class Cache:
self, records: _ModelT, field: Field, value
) -> _ModelT: ...
def get_fields(self, record: BaseModel) -> Iterator[Field]: ...
def get_records(self, model: _ModelT, field: Field) -> _ModelT: ...
def get_records(
self, model: _ModelT, field: Field, all_contexts: bool = ...
) -> _ModelT: ...
def get_missing_ids(self, records: BaseModel, field: Field) -> Iterator[int]: ...
def get_dirty_fields(self) -> "set[Field]": ...
def get_dirty_records(self, model: _ModelT, field: Field) -> _ModelT: ...

View File

@@ -533,6 +533,9 @@ class BaseModel(metaclass=MetaModel):
def modified(
self, fnames: Collection[str], create: bool = ..., before: bool = ...
) -> None: ...
def _modified(
self, fields: list, create: bool
) -> Iterator[tuple[Field, _ModelT, bool]]: ...
def _modified_triggers(
self: _ModelT, tree: dict[Field | None, Any], create: bool = ...
) -> Iterator[tuple[Field, _ModelT, bool]]: ...