mirror of
https://github.com/odoo-ide/odoo-stubs.git
synced 2025-05-08 16:52:26 +03:00
isort + black
This commit is contained in:
@@ -3,13 +3,15 @@ from typing import Any, Callable, TextIO
|
||||
|
||||
from lxml.etree import _Element
|
||||
|
||||
from .misc import ustr as ustr
|
||||
from ..api import Environment
|
||||
from ..sql_db import Cursor
|
||||
from .misc import ustr as ustr
|
||||
|
||||
__all__ = [
|
||||
'convert_file', 'convert_sql_import',
|
||||
'convert_csv_import', 'convert_xml_import'
|
||||
"convert_file",
|
||||
"convert_sql_import",
|
||||
"convert_csv_import",
|
||||
"convert_xml_import",
|
||||
]
|
||||
|
||||
safe_eval: Callable
|
||||
@@ -28,7 +30,9 @@ def str2bool(value) -> bool: ...
|
||||
def nodeattr2bool(node: _Element, attr, default: bool = ...) -> bool: ...
|
||||
|
||||
class xml_import:
|
||||
def get_env(self, node: _Element, eval_context: dict | None = ...) -> Environment: ...
|
||||
def get_env(
|
||||
self, node: _Element, eval_context: dict | None = ...
|
||||
) -> Environment: ...
|
||||
def make_xml_id(self, xml_id: str) -> str: ...
|
||||
def _test_xml_id(self, xml_id: str) -> None: ...
|
||||
def _tag_delete(self, rec: _Element) -> None: ...
|
||||
@@ -39,7 +43,9 @@ class xml_import:
|
||||
def _tag_record(self, rec: _Element) -> tuple[str, int] | None: ...
|
||||
def _tag_template(self, el: _Element) -> tuple[str, int] | None: ...
|
||||
def id_get(self, id_str: str, raise_if_not_found: bool = ...) -> int | None: ...
|
||||
def model_id_get(self, id_str: str, raise_if_not_found: bool = ...) -> tuple[Any, Any]: ...
|
||||
def model_id_get(
|
||||
self, id_str: str, raise_if_not_found: bool = ...
|
||||
) -> tuple[Any, Any]: ...
|
||||
def _tag_root(self, el: _Element) -> None: ...
|
||||
@property
|
||||
def env(self) -> Environment: ...
|
||||
@@ -52,11 +58,44 @@ class xml_import:
|
||||
_noupdate: list[bool]
|
||||
xml_filename: str
|
||||
_tags: dict[str, Callable]
|
||||
def __init__(self, cr: Cursor, module: str, idref: dict, mode: str, noupdate: bool = ..., xml_filename: str | None = ...) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
cr: Cursor,
|
||||
module: str,
|
||||
idref: dict,
|
||||
mode: str,
|
||||
noupdate: bool = ...,
|
||||
xml_filename: str | None = ...,
|
||||
) -> None: ...
|
||||
def parse(self, de: _Element) -> None: ...
|
||||
DATA_ROOTS: list[str]
|
||||
|
||||
def convert_file(cr: Cursor, module: str, filename: str, idref: dict, mode: str = ..., noupdate: bool = ..., kind: str | None = ..., pathname: str | None = ...) -> None: ...
|
||||
def convert_file(
|
||||
cr: Cursor,
|
||||
module: str,
|
||||
filename: str,
|
||||
idref: dict,
|
||||
mode: str = ...,
|
||||
noupdate: bool = ...,
|
||||
kind: str | None = ...,
|
||||
pathname: str | None = ...,
|
||||
) -> None: ...
|
||||
def convert_sql_import(cr: Cursor, fp: TextIO) -> None: ...
|
||||
def convert_csv_import(cr: Cursor, module: str, fname: str, csvcontent: bytes, idref: dict | None = ..., mode: str = ..., noupdate: bool = ...) -> None: ...
|
||||
def convert_xml_import(cr: Cursor, module: str, xmlfile: str | BufferedReader, idref: dict | None = ..., mode: str = ..., noupdate: bool = ..., report: Any | None = ...) -> None: ...
|
||||
def convert_csv_import(
|
||||
cr: Cursor,
|
||||
module: str,
|
||||
fname: str,
|
||||
csvcontent: bytes,
|
||||
idref: dict | None = ...,
|
||||
mode: str = ...,
|
||||
noupdate: bool = ...,
|
||||
) -> None: ...
|
||||
def convert_xml_import(
|
||||
cr: Cursor,
|
||||
module: str,
|
||||
xmlfile: str | BufferedReader,
|
||||
idref: dict | None = ...,
|
||||
mode: str = ...,
|
||||
noupdate: bool = ...,
|
||||
report: Any | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user