Files
odoo-stubs/odoo-stubs/tools/view_validation.pyi
Trinh Anh Ngoc a546490a77 isort + black
2023-05-18 21:35:14 +07:00

23 lines
846 B
Python

from ast import expr as _expr
from collections import defaultdict
from re import Pattern
from typing import Callable, TypeVar
from lxml.etree import RelaxNG, _Element
_CallableT = TypeVar("_CallableT", bound=Callable)
_validators: defaultdict[str, list[Callable]]
_relaxng_cache: dict[str, RelaxNG | None]
READONLY: Pattern
def _get_attrs_symbols() -> set[str]: ...
def get_variable_names(expr: str | _expr) -> set[str]: ...
def get_dict_asts(expr: str | _expr) -> dict: ...
def _check(condition: bool, explanation: str) -> None: ...
def get_domain_identifiers(expr: str | _expr) -> tuple[set[str], set[str]]: ...
def valid_view(arch: _Element, **kwargs) -> bool: ...
def validate(*view_types: str) -> Callable[[_CallableT], _CallableT]: ...
def relaxng(view_type: str) -> RelaxNG: ...
def schema_valid(arch: _Element, **kwargs) -> bool: ...