Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-05-17 15:18:04 +07:00
parent 67ab41bbac
commit 5312e133ab

View File

@@ -1,6 +1,6 @@
from collections import defaultdict from collections import defaultdict
from re import Pattern from re import Pattern
from typing import Any, Callable, Collection, Container, Iterable, Iterator, MutableMapping, Sequence, TypeVar, Union from typing import Any, Callable, Collection, Container, Iterable, Iterator, Literal, MutableMapping, Sequence, TypeVar, Union, overload
import psycopg2 import psycopg2
from lxml.etree import _Element from lxml.etree import _Element
@@ -157,7 +157,10 @@ class BaseModel(metaclass=MetaModel):
def get_formview_action(self, access_uid: int | None = ...) -> dict[str, Any]: ... def get_formview_action(self, access_uid: int | None = ...) -> dict[str, Any]: ...
def get_access_action(self, access_uid: int | None = ...) -> dict[str, Any]: ... def get_access_action(self, access_uid: int | None = ...) -> dict[str, Any]: ...
def search_count(self, args: _Domain) -> int: ... def search_count(self, args: _Domain) -> int: ...
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: bool = ...) -> _ModelT | int: ... @overload
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: Literal[False] = ...) -> _ModelT: ...
@overload
def search(self: _ModelT, args: _Domain, offset: int = ..., limit: int | None = ..., order: str | None = ..., count: Literal[True] = ...) -> int: ...
def _compute_display_name(self) -> None: ... def _compute_display_name(self) -> None: ...
def name_get(self) -> list[tuple[int, str]]: ... def name_get(self) -> list[tuple[int, str]]: ...
def name_create(self, name: str) -> tuple[int, str]: ... def name_create(self, name: str) -> tuple[int, str]: ...