From 91f1a67eb3c3b3724f0caf279995c5d2421936e5 Mon Sep 17 00:00:00 2001 From: Trinh Anh Ngoc Date: Sun, 7 May 2023 09:47:32 +0700 Subject: [PATCH] Update stubs --- odoo-stubs/modules/migration.pyi | 3 +++ odoo-stubs/tests/test_module_operations.pyi | 13 ++++++++++--- odoo-stubs/tools/cloc.pyi | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/odoo-stubs/modules/migration.pyi b/odoo-stubs/modules/migration.pyi index 22b1740..5927cfa 100644 --- a/odoo-stubs/modules/migration.pyi +++ b/odoo-stubs/modules/migration.pyi @@ -1,8 +1,11 @@ +from re import Pattern from types import ModuleType from .graph import Graph, Node from ..sql_db import Cursor +VERSION_RE: Pattern + def load_script(path: str, module_name: str) -> ModuleType: ... class MigrationManager: diff --git a/odoo-stubs/tests/test_module_operations.pyi b/odoo-stubs/tests/test_module_operations.pyi index 6bf3a5d..8825e08 100644 --- a/odoo-stubs/tests/test_module_operations.pyi +++ b/odoo-stubs/tests/test_module_operations.pyi @@ -1,4 +1,4 @@ -from argparse import Namespace +from argparse import Action, Namespace BLACKLIST: set[str] IGNORE: tuple[str, ...] @@ -8,6 +8,13 @@ def install(db_name: str, module_id: int, module_name: str) -> None: ... def uninstall(db_name: str, module_id: int, module_name: str) -> None: ... def cycle(db_name: str, module_id: int, module_name: str) -> None: ... def parse_args() -> Namespace: ... -def test_full(args: Namespace) -> None: ... + +class UninstallAction(Action): + def __call__(self, parser, namespace, values, option_string = ...) -> None: ... + +class StandaloneAction(Action): + def __call__(self, parser, namespace, values, option_string = ...) -> None: ... + +def test_cycle(args: Namespace) -> None: ... def test_uninstall(args: Namespace) -> None: ... -def test_scripts(args: Namespace) -> None: ... +def test_standalone(args: Namespace) -> None: ... diff --git a/odoo-stubs/tools/cloc.pyi b/odoo-stubs/tools/cloc.pyi index 7e9d974..e9ce118 100644 --- a/odoo-stubs/tools/cloc.pyi +++ b/odoo-stubs/tools/cloc.pyi @@ -6,6 +6,7 @@ VERSION: int DEFAULT_EXCLUDE: list[str] STANDARD_MODULES: list[str] MAX_FILE_SIZE: int +MAX_LINE_SIZE: int VALID_EXTENSION: list[str] class Cloc: