Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-07-27 10:42:48 +07:00
parent 8c9d51e2eb
commit c352bfb67e

View File

@@ -1,5 +1,5 @@
from collections import MutableMapping from collections import MutableMapping
from typing import Any, Callable, Dict, Generator, List, TypeVar, overload from typing import Any, Callable, Dict, Generator, List, Literal, TypeVar, overload
from . import api, fields from . import api, fields
from .api import Environment from .api import Environment
@@ -137,14 +137,24 @@ class BaseModel:
def get_formview_action(self): ... def get_formview_action(self): ...
def get_access_action(self): ... def get_access_action(self): ...
def search_count(self, args) -> int: ... def search_count(self, args) -> int: ...
@overload
def search( def search(
self: _ModelT, self: _ModelT,
args, args,
offset: int = ..., offset: int = ...,
limit: Any | None = ..., limit: int | None = ...,
order: Any | None = ..., order: str | None = ...,
count: bool = ..., count: Literal[False] = ...,
) -> _ModelT: ... ) -> _ModelT: ...
@overload
def search(
self: _ModelT,
args,
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): ... def name_get(self): ...
def name_create(self, name): ... def name_create(self, name): ...