This commit is contained in:
Trinh Anh Ngoc
2023-05-18 17:49:43 +07:00
parent 2d02bd54e8
commit 0aa797dda6
26 changed files with 6 additions and 200 deletions

View File

@@ -3,7 +3,6 @@ from psycopg2 import connection
from . import (
addons as addons,
api as api,
cli as cli,
conf as conf,
fields as fields,
http as http,
@@ -14,8 +13,7 @@ from . import (
release as release,
service as service,
sql_db as sql_db,
tools as tools,
upgrade as upgrade
tools as tools
)
from .api import Registry
from .fields import Command as Command

View File

@@ -1,3 +0,0 @@
from typing import Any
__path__: Any

View File

@@ -1,14 +0,0 @@
from . import (
cloc as cloc,
db as db,
deploy as deploy,
genproxytoken as genproxytoken,
neutralize as neutralize,
populate as populate,
scaffold as scaffold,
server as server,
shell as shell,
start as start,
tsconfig as tsconfig
)
from .command import Command as Command, main as main

View File

@@ -1,4 +0,0 @@
from . import Command
class Cloc(Command):
def run(self, args) -> None: ...

View File

@@ -1,10 +0,0 @@
commands: dict[str, type[Command]]
class Command:
name: str
def __init_subclass__(cls) -> None: ...
class Help(Command):
def run(self, args) -> None: ...
def main() -> None: ...

View File

@@ -1,15 +0,0 @@
from typing import Callable
from . import Command
eprint: Callable
class Db(Command):
name: str
def run(self, cmdargs): ...
def load(self, args) -> None: ...
def dump(self, args) -> None: ...
def duplicate(self, args) -> None: ...
def rename(self, args) -> None: ...
def drop(self, args) -> None: ...
def _check_target(self, target, *, delete_if_exists) -> None: ...

View File

@@ -1,10 +0,0 @@
from . import Command
from typing import Any
class Deploy(Command):
session: Any
def __init__(self) -> None: ...
def deploy_module(self, module_path, url, login, password, db: str = ..., force: bool = ...): ...
def login_upload_module(self, module_file, url, login, password, db, force: bool = ...): ...
def zip_module(self, path): ...
def run(self, cmdargs) -> None: ...

View File

@@ -1,7 +0,0 @@
from . import Command
class GenProxyToken(Command):
command_name: str
def __init__(self) -> None: ...
def generate_token(self, length: int = ...): ...
def run(self, cmdargs) -> None: ...

View File

@@ -1,4 +0,0 @@
from . import Command
class Neutralize(Command):
def run(self, args) -> None: ...

View File

@@ -1,11 +0,0 @@
from . import Command
from ..api import Environment
from ..models import BaseModel
class Populate(Command):
def run(self, cmdargs) -> None: ...
@classmethod
def populate(cls, env: Environment, size, model_patterns: bool = ..., profiling_enabled: bool = ...,
commit: bool = ...) -> dict: ...
@classmethod
def _get_ordered_models(cls, env: Environment, model_patterns: bool = ...) -> list[BaseModel]: ...

View File

@@ -1,25 +0,0 @@
from . import Command
from typing import Any
class Scaffold(Command):
def run(self, cmdargs) -> None: ...
def epilog(self): ...
builtins: Any
def snake(s): ...
def pascal(s): ...
def directory(p, create: bool = ...): ...
env: Any
class template:
id: Any
path: Any
def __init__(self, identifier) -> None: ...
def __str__(self): ...
def files(self) -> None: ...
def render_to(self, modname, directory, params: Any | None = ...) -> None: ...
def die(message, code: int = ...) -> None: ...
def warn(message) -> None: ...

View File

@@ -1,18 +0,0 @@
from . import Command
from typing import Any
__author__: Any
__version__: Any
_logger: Any
def check_root_user() -> None: ...
def check_postgres_user() -> None: ...
def report_configuration() -> None: ...
def rm_pid_file(main_pid) -> None: ...
def setup_pid_file() -> None: ...
def export_translation() -> None: ...
def import_translation() -> None: ...
def main(args) -> None: ...
class Server(Command):
def run(self, args) -> None: ...

View File

@@ -1,21 +0,0 @@
import code
from . import Command
from typing import Any
_logger: Any
def raise_keyboard_interrupt(*a) -> None: ...
class Console(code.InteractiveConsole):
def __init__(self, locals: Any | None = ..., filename: str = ...) -> None: ...
class Shell(Command):
supported_shells: Any
def init(self, args) -> None: ...
def console(self, local_vars): ...
def ipython(self, local_vars) -> None: ...
def ptpython(self, local_vars) -> None: ...
def bpython(self, local_vars) -> None: ...
def python(self, local_vars) -> None: ...
def shell(self, dbname) -> None: ...
def run(self, args): ...

View File

@@ -1,7 +0,0 @@
from . import Command
class Start(Command):
def get_module_list(self, path): ...
def run(self, cmdargs): ...
def die(message, code: int = ...) -> None: ...

View File

@@ -1,13 +0,0 @@
from . import Command
class TSConfig(Command):
command_name: str
def __init__(self) -> None: ...
def get_module_list(self, path): ...
def clean_path(self, path): ...
def prefix_suffix_path(self, path, prefix, suffix): ...
def remove_(self, modules, module) -> None: ...
def run(self, cmdargs) -> None: ...
def generate_imports(self, modules): ...
def generate_file_content(self, modules, paths): ...
def generate_excludes(self): ...

View File

@@ -4,7 +4,7 @@ from .graph import Graph, Node
from .registry import Registry
from ..api import Environment
from ..sql_db import Cursor
from ..tests.runner import OdooTestResult
from ..tests.result import OdooTestResult
def load_data(env: Environment, idref: dict, mode: str, kind: str, package: Node) -> bool: ...
def load_demo(env: Environment, package: Node, idref: dict, mode: str) -> bool: ...

View File

@@ -8,7 +8,7 @@ from .graph import Node
from ..models import BaseModel
from ..fields import Field
from ..sql_db import Connection, Cursor
from ..tests.runner import OdooTestResult
from ..tests.result import OdooTestResult
from ..tools import Collector
from ..tools.lru import LRU

View File

@@ -1,3 +1,3 @@
from .common import *
from . import common as common, test_parse_inline_template as test_parse_inline_template
from . import common as common
from .form import Form as Form, M2MProxy as M2MProxy, O2MProxy as O2MProxy

View File

@@ -1,6 +1,5 @@
import collections
import logging
import sys
from concurrent.futures import Future
from itertools import count
from subprocess import Popen
@@ -12,7 +11,7 @@ import requests
from websocket import WebSocket
from . import case
from .runner import OdooTestResult
from .result import OdooTestResult
from ..api import Environment
from ..http import Session
from ..models import BaseModel

View File

@@ -1,20 +0,0 @@
from argparse import Action, Namespace
BLACKLIST: set[str]
IGNORE: tuple[str, ...]
INSTALL_BLACKLIST: set[str]
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: ...
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_standalone(args: Namespace) -> None: ...

View File

@@ -1,6 +0,0 @@
from odoo.tests import BaseCase
class TestParseInlineTemplate(BaseCase):
def test_no_expression(self) -> None: ...
def test_expression1(self) -> None: ...
def test_expression2(self) -> None: ...

View File

@@ -11,13 +11,11 @@ from .translate import *
from .xml_utils import *
from .convert import *
from . import (
_monkeypatches as _monkeypatches,
appdirs as appdirs,
cloc as cloc,
osutil as osutil,
pdf as pdf,
pycompat as pycompat,
win32 as win32
pycompat as pycompat
)
from .config import config as config
from .js_transpiler import (

View File

@@ -1 +0,0 @@
def nl_langinfo(param) -> str: ...