Update stubs

This commit is contained in:
Trinh Anh Ngoc
2022-11-05 11:24:46 +07:00
parent a881835e26
commit ed4afbdffe
9 changed files with 53 additions and 50 deletions

View File

@@ -1,2 +1,10 @@
from . import cloc as cloc, deploy as deploy, populate as populate, scaffold as scaffold, server as server, shell as shell, start as start
from . import (
cloc as cloc,
deploy as deploy,
populate as populate,
scaffold as scaffold,
server as server,
shell as shell,
start as start
)
from .command import Command as Command, main as main

View File

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

View File

@@ -1,13 +1,11 @@
from typing import Any
commands: Any
commands: dict[str, CommandType]
class CommandType(type):
def __init__(cls, name: Any, bases: Any, attrs: Any) -> None: ...
def __init__(cls, name, bases, attrs) -> None: ...
Command: Any
Command: CommandType
class Help(Command):
def run(self, args: Any) -> None: ...
def run(self, args) -> None: ...
def main() -> None: ...

View File

@@ -2,9 +2,9 @@ from . import Command
from typing import Any
class Deploy(Command):
session: Any = ...
session: Any
def __init__(self) -> None: ...
def deploy_module(self, module_path: Any, url: Any, login: Any, password: Any, db: str = ..., force: bool = ...): ...
def login_upload_module(self, module_file: Any, url: Any, login: Any, password: Any, db: Any, force: bool = ...): ...
def zip_module(self, path: Any): ...
def run(self, cmdargs: Any) -> 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,11 +1,10 @@
from . import Command
from typing import Any
_logger: Any
from ..api import Environment
from ..models import BaseModel
class Populate(Command):
def run(self, cmdargs: Any) -> None: ...
def run(self, cmdargs) -> None: ...
@classmethod
def populate(cls, env: Any, size: Any, model_patterns: bool = ...): ...
def populate(cls, env: Environment, size, model_patterns: bool = ...) -> dict | None: ...
@classmethod
def _get_ordered_models(cls, env: Any, model_patterns: bool = ...): ...
def _get_ordered_models(cls, env: Environment, model_patterns: bool = ...) -> list[BaseModel]: ...

View File

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

View File

@@ -8,11 +8,11 @@ _logger: Any
def check_root_user() -> None: ...
def check_postgres_user() -> None: ...
def report_configuration() -> None: ...
def rm_pid_file(main_pid: Any) -> None: ...
def rm_pid_file(main_pid) -> None: ...
def setup_pid_file() -> None: ...
def export_translation() -> None: ...
def import_translation() -> None: ...
def main(args: Any) -> None: ...
def main(args) -> None: ...
class Server(Command):
def run(self, args: Any) -> None: ...
def run(self, args) -> None: ...

View File

@@ -1,21 +1,21 @@
import code
from . import Command
from typing import Any, Optional
from typing import Any
_logger: Any
def raise_keyboard_interrupt(*a: Any) -> None: ...
def raise_keyboard_interrupt(*a) -> None: ...
class Console(code.InteractiveConsole):
def __init__(self, locals: Optional[Any] = ..., filename: str = ...) -> None: ...
def __init__(self, locals: Any | None = ..., filename: str = ...) -> None: ...
class Shell(Command):
supported_shells: Any = ...
def init(self, args: Any) -> None: ...
def console(self, local_vars: Any): ...
def ipython(self, local_vars: Any) -> None: ...
def ptpython(self, local_vars: Any) -> None: ...
def bpython(self, local_vars: Any) -> None: ...
def python(self, local_vars: Any) -> None: ...
def shell(self, dbname: Any) -> None: ...
def run(self, args: Any): ...
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,8 +1,7 @@
from . import Command
from typing import Any
class Start(Command):
def get_module_list(self, path: Any): ...
def run(self, cmdargs: Any): ...
def get_module_list(self, path): ...
def run(self, cmdargs): ...
def die(message: Any, code: int = ...) -> None: ...
def die(message, code: int = ...) -> None: ...