Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-10-18 15:29:45 +07:00
parent cbbf53e0ed
commit 7bc72c97d1
5 changed files with 6 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ class Environment(Mapping[str, BaseModel]):
def __new__(
cls, cr: Cursor, uid: int | None, context: dict, su: bool = ...
) -> Environment: ...
def __contains__(self, model_name: str) -> bool: ...
def __contains__(self, model_name) -> bool: ...
def __getitem__(self, model_name: str) -> BaseModel: ...
def __iter__(self) -> Iterator[str]: ...
def __len__(self) -> int: ...

View File

@@ -18,9 +18,8 @@ def get_module_path(
) -> str | Literal[False]: ...
def get_module_filetree(module: str, dir: str = ...) -> dict: ...
def get_resource_path(module: str, *args) -> str | Literal[False]: ...
def check_resource_path(mod_path: str, *args) -> str | Literal[False]: ...
get_module_resource = get_resource_path
check_resource_path = get_resource_path
def get_resource_from_path(path: str) -> tuple[str, str, str] | None: ...
def get_module_icon(module: str) -> str: ...

View File

@@ -4,7 +4,6 @@ from typing import Any, Callable, TextIO
from lxml.etree import _Element
from ..api import Environment
from .misc import ustr as ustr
safe_eval: Callable
@@ -31,6 +30,7 @@ class xml_import:
def env(self) -> Environment: ...
@property
def noupdate(self) -> bool: ...
def next_sequence(self) -> int: ...
mode: str
module: str
envs: list[Environment]

View File

@@ -293,6 +293,8 @@ class Unpickler(pickle_.Unpickler):
pickle: ModuleType
class ReadonlyDict(Mapping): ...
class DotDict(dict):
def __getattr__(self, attrib): ...

View File

@@ -17,6 +17,7 @@ class BrandedFileWriter(PdfFileWriter):
PdfFileWriter = BrandedFileWriter
def merge_pdf(pdf_data: Iterable[bytes]) -> bytes: ...
def fill_form_fields_pdf(document: bytes, form_fields: dict | None = ...) -> bytes: ...
def rotate_pdf(pdf: bytes) -> bytes: ...
def to_pdf_stream(attachment: IrAttachment) -> BytesIO: ...
def add_banner(