Update stubs

This commit is contained in:
Trinh Anh Ngoc
2022-10-12 00:11:56 +07:00
parent b714b79c3d
commit dc6e56e1ce
3 changed files with 23 additions and 24 deletions

View File

@@ -1,9 +1,10 @@
from typing import Any from typing import Iterator
_logger: Any from .runner import OdooTestResult
from ..tests import OdooSuite
def get_test_modules(module): ... def get_test_modules(module: str) -> list: ...
def _get_tests_modules(path, module): ... def _get_tests_modules(path: str, module: str) -> list: ...
def make_suite(module_names, position: str = ...): ... def make_suite(module_names: list[str], position: str = ...) -> OdooSuite: ...
def run_suite(suite, module_name: Any | None = ...): ... def run_suite(suite: OdooSuite, module_name: str | None = ...) -> OdooTestResult: ...
def unwrap_suite(test) -> None: ... def unwrap_suite(test) -> Iterator: ...

View File

@@ -1,16 +1,15 @@
import unittest import unittest
from typing import Any from typing import Any
_logger: Any
class OdooTestResult(unittest.result.TestResult): class OdooTestResult(unittest.result.TestResult):
time_start: Any time_start: float | None
queries_start: Any queries_start: int | None
def __init__(self) -> None: ... def __init__(self) -> None: ...
def __str__(self): ... def __str__(self) -> str: ...
shouldStop: Any shouldStop: Any
def update(self, other) -> None: ... def update(self, other) -> None: ...
def log(self, level, msg, *args, test: Any | None = ..., exc_info: Any | None = ..., extra: Any | None = ..., stack_info: bool = ..., caller_infos: Any | None = ...) -> None: ... def log(self, level, msg, *args, test: Any | None = ..., exc_info: Any | None = ..., extra: Any | None = ...,
stack_info: bool = ..., caller_infos: Any | None = ...) -> None: ...
def getDescription(self, test): ... def getDescription(self, test): ...
def startTest(self, test) -> None: ... def startTest(self, test) -> None: ...
def addError(self, test, err) -> None: ... def addError(self, test, err) -> None: ...

View File

@@ -1,13 +1,12 @@
from typing import Any from argparse import Namespace
_logger: Any BLACKLIST: set[str]
BLACKLIST: Any IGNORE: tuple[str, ...]
IGNORE: Any
def install(db_name, module_id, module_name) -> None: ... def install(db_name: str, module_id: int, module_name: str) -> None: ...
def uninstall(db_name, module_id, module_name) -> None: ... def uninstall(db_name: str, module_id: int, module_name: str) -> None: ...
def cycle(db_name, module_id, module_name) -> None: ... def cycle(db_name: str, module_id: int, module_name: str) -> None: ...
def parse_args(): ... def parse_args() -> Namespace: ...
def test_full(args): ... def test_full(args: Namespace) -> None: ...
def test_uninstall(args) -> None: ... def test_uninstall(args: Namespace) -> None: ...
def test_scripts(args) -> None: ... def test_scripts(args: Namespace) -> None: ...