Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-07-27 10:32:44 +07:00
parent 8dcdb75278
commit 200f20bd10

View File

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