Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-12-04 21:19:05 +07:00
parent 7c29eaef8d
commit c4fc517583
9 changed files with 17 additions and 10 deletions

View File

@@ -165,7 +165,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

@@ -67,6 +67,7 @@ class Field(Generic[_FieldValueT], metaclass=MetaField):
company_dependent: bool
default: Any
string: str | None
export_string_translation: bool
help: str | None
readonly: bool
required: bool

View File

@@ -517,6 +517,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: TriggerTree, create: bool = ...
) -> Iterator[tuple[Field, _ModelT, bool]]: ...

View File

@@ -1 +0,0 @@
from . import osv as osv

View File

@@ -1 +0,0 @@
def __getattr__(name): ...

View File

@@ -1,4 +1,3 @@
from itertools import chain as chain
from socket import socket as socket_
from threading import Semaphore, Thread
from typing import Any, Callable, Literal, TypeVar

View File

@@ -122,8 +122,7 @@ class SingleTransactionCase(BaseCase):
class ChromeBrowserException(Exception): ...
def fmap(future, map_fun): ...
def fchain(future, next_callback): ...
def run(gen_func) -> None: ...
def save_test_file(
test_name: str,
content,
@@ -135,7 +134,8 @@ def save_test_file(
class ChromeBrowser:
remote_debugging_port: int
test_class: type[HttpCase]
test_case: HttpCase
success_signal: Callable[[str], bool]
chrome: Popen
devtools_port: int | None
ws: WebSocket | None
@@ -145,7 +145,12 @@ class ChromeBrowser:
sigxcpu_handler: Any
error_checker: Any
had_failure: bool
def __init__(self, test_class: type[HttpCase], headless: bool = ...) -> None: ...
def __init__(
self,
test_case: HttpCase,
success_signal: Callable[[str], bool],
headless: bool = ...,
) -> None: ...
@property
def screencasts_frames_dir(self) -> str: ...
def signal_handler(self, sig, frame) -> None: ...
@@ -210,6 +215,7 @@ class HttpCase(TransactionCase):
cookies: Any | None = ...,
error_checker: Any | None = ...,
watch: bool = ...,
success_signal: Callable[[str], bool] | None = ...,
**kw
) -> None: ...
@classmethod

View File

@@ -87,7 +87,6 @@ def posix_to_ldml(fmt: str, locale: Locale) -> str: ...
def split_every(
n: int, iterable: Iterable[_T], piece_maker: Callable[[Iterable[_T]], _T1] = ...
) -> Iterator[_T1]: ...
def discardattr(obj, key: str) -> None: ...
def remove_accents(input_str: str) -> str: ...

View File

@@ -13,7 +13,6 @@ from .pycompat import _CsvWriter
PYTHON_TRANSLATION_COMMENT: str
JAVASCRIPT_TRANSLATION_COMMENT: str
WEB_TRANSLATION_COMMENT: str
SKIPPED_ELEMENTS: tuple[str, ...]
class UNIX_LINE_TERMINATOR(csv.excel):