mirror of
https://github.com/odoo-ide/odoo-stubs.git
synced 2025-05-08 16:52:26 +03:00
Update stubs
This commit is contained in:
1
odoo-stubs/service/__init__.pyi
Normal file
1
odoo-stubs/service/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
from . import common as common, db as db, model as model, server as server, wsgi_server as wsgi_server
|
||||
11
odoo-stubs/service/common.pyi
Normal file
11
odoo-stubs/service/common.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
RPC_VERSION_1: Any
|
||||
|
||||
def exp_login(db: Any, login: Any, password: Any): ...
|
||||
def exp_authenticate(db: Any, login: Any, password: Any, user_agent_env: Any): ...
|
||||
def exp_version(): ...
|
||||
def exp_about(extended: bool = ...): ...
|
||||
def exp_set_loglevel(loglevel: Any, logger: Optional[Any] = ...): ...
|
||||
def dispatch(method: Any, params: Any): ...
|
||||
31
odoo-stubs/service/db.pyi
Normal file
31
odoo-stubs/service/db.pyi
Normal file
@@ -0,0 +1,31 @@
|
||||
from functools import wraps as wraps
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
|
||||
class DatabaseExists(Warning): ...
|
||||
|
||||
def check_db_management_enabled(method: Any): ...
|
||||
def check_super(passwd: Any): ...
|
||||
def _initialize_db(id: Any, db_name: Any, demo: Any, lang: Any, user_password: Any, login: str = ..., country_code: Optional[Any] = ..., phone: Optional[Any] = ...) -> None: ...
|
||||
def _create_empty_database(name: Any) -> None: ...
|
||||
def exp_create_database(db_name: Any, demo: Any, lang: Any, user_password: str = ..., login: str = ..., country_code: Optional[Any] = ..., phone: Optional[Any] = ...): ...
|
||||
def exp_duplicate_database(db_original_name: Any, db_name: Any): ...
|
||||
def _drop_conn(cr: Any, db_name: Any) -> None: ...
|
||||
def exp_drop(db_name: Any): ...
|
||||
def exp_dump(db_name: Any, format: Any): ...
|
||||
def dump_db_manifest(cr: Any): ...
|
||||
def dump_db(db_name: Any, stream: Any, backup_format: str = ...): ...
|
||||
def exp_restore(db_name: Any, data: Any, copy: bool = ...): ...
|
||||
def restore_db(db: Any, dump_file: Any, copy: bool = ...) -> None: ...
|
||||
def exp_rename(old_name: Any, new_name: Any): ...
|
||||
def exp_change_admin_password(new_password: Any): ...
|
||||
def exp_migrate_databases(databases: Any): ...
|
||||
def exp_db_exist(db_name: Any): ...
|
||||
def list_dbs(force: bool = ...): ...
|
||||
def list_db_incompatible(databases: Any): ...
|
||||
def exp_list(document: bool = ...): ...
|
||||
def exp_list_lang(): ...
|
||||
def exp_list_countries(): ...
|
||||
def exp_server_version(): ...
|
||||
def dispatch(method: Any, params: Any): ...
|
||||
11
odoo-stubs/service/model.pyi
Normal file
11
odoo-stubs/service/model.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
_logger: Any
|
||||
PG_CONCURRENCY_ERRORS_TO_RETRY: Any
|
||||
MAX_TRIES_ON_CONCURRENCY_FAILURE: int
|
||||
|
||||
def dispatch(method: Any, params: Any): ...
|
||||
def check(f: Any): ...
|
||||
def execute_cr(cr: Any, uid: Any, obj: Any, method: Any, *args: Any, **kw: Any): ...
|
||||
def execute_kw(db: Any, uid: Any, obj: Any, method: Any, args: Any, kw: Optional[Any] = ...): ...
|
||||
def execute(db: Any, uid: Any, obj: Any, method: Any, *args: Any, **kw: Any): ...
|
||||
6
odoo-stubs/service/security.pyi
Normal file
6
odoo-stubs/service/security.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
|
||||
def login(db: Any, login: Any, password: Any): ...
|
||||
def check(db: Any, uid: Any, passwd: Any): ...
|
||||
def compute_session_token(session: Any, env: Any): ...
|
||||
def check_session(session: Any, env: Any): ...
|
||||
175
odoo-stubs/service/server.pyi
Normal file
175
odoo-stubs/service/server.pyi
Normal file
@@ -0,0 +1,175 @@
|
||||
import werkzeug.serving
|
||||
from typing import Any, Optional
|
||||
|
||||
INOTIFY_LISTEN_EVENTS: Any
|
||||
_logger: Any
|
||||
SLEEP_INTERVAL: int
|
||||
|
||||
def memory_info(process: Any): ...
|
||||
def set_limit_memory_hard() -> None: ...
|
||||
def empty_pipe(fd: Any) -> None: ...
|
||||
|
||||
class LoggingBaseWSGIServerMixIn:
|
||||
def handle_error(self, request: Any, client_address: Any) -> None: ...
|
||||
|
||||
class BaseWSGIServerNoBind(LoggingBaseWSGIServerMixIn, werkzeug.serving.BaseWSGIServer):
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def server_activate(self) -> None: ...
|
||||
|
||||
class RequestHandler(werkzeug.serving.WSGIRequestHandler):
|
||||
timeout: int = ...
|
||||
def setup(self) -> None: ...
|
||||
|
||||
class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer):
|
||||
max_http_threads: Any = ...
|
||||
http_threads_sem: Any = ...
|
||||
daemon_threads: bool = ...
|
||||
def __init__(self, host: Any, port: Any, app: Any) -> None: ...
|
||||
reload_socket: bool = ...
|
||||
socket: Any = ...
|
||||
def server_bind(self) -> None: ...
|
||||
def server_activate(self) -> None: ...
|
||||
def process_request(self, request: Any, client_address: Any) -> None: ...
|
||||
def _handle_request_noblock(self) -> None: ...
|
||||
def shutdown_request(self, request: Any) -> None: ...
|
||||
|
||||
class FSWatcherBase:
|
||||
def handle_file(self, path: Any): ...
|
||||
|
||||
class FSWatcherWatchdog(FSWatcherBase):
|
||||
observer: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def dispatch(self, event: Any) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
|
||||
class FSWatcherInotify(FSWatcherBase):
|
||||
started: bool = ...
|
||||
watcher: Any = ...
|
||||
def __init__(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
thread: Any = ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
|
||||
class CommonServer:
|
||||
app: Any = ...
|
||||
interface: Any = ...
|
||||
port: Any = ...
|
||||
pid: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def close_socket(self, sock: Any) -> None: ...
|
||||
|
||||
class ThreadedServer(CommonServer):
|
||||
main_thread_id: Any = ...
|
||||
quit_signals_received: int = ...
|
||||
httpd: Any = ...
|
||||
limits_reached_threads: Any = ...
|
||||
limit_reached_time: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def signal_handler(self, sig: Any, frame: Any) -> None: ...
|
||||
def process_limit(self) -> None: ...
|
||||
def cron_thread(self, number: Any) -> None: ...
|
||||
def cron_spawn(self) -> None: ...
|
||||
def http_thread(self): ...
|
||||
def http_spawn(self) -> None: ...
|
||||
def start(self, stop: bool = ...): ...
|
||||
def stop(self) -> None: ...
|
||||
def run(self, preload: Optional[Any] = ..., stop: bool = ...): ...
|
||||
def reload(self) -> None: ...
|
||||
|
||||
class GeventServer(CommonServer):
|
||||
port: Any = ...
|
||||
httpd: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def process_limits(self) -> None: ...
|
||||
ppid: Any = ...
|
||||
def watchdog(self, beat: int = ...) -> None: ...
|
||||
client_address: Any = ...
|
||||
def start(self): ...
|
||||
def stop(self) -> None: ...
|
||||
def run(self, preload: Any, stop: Any) -> None: ...
|
||||
|
||||
class PreforkServer(CommonServer):
|
||||
address: Any = ...
|
||||
population: Any = ...
|
||||
timeout: Any = ...
|
||||
limit_request: Any = ...
|
||||
cron_timeout: Any = ...
|
||||
beat: int = ...
|
||||
app: Any = ...
|
||||
pid: Any = ...
|
||||
socket: Any = ...
|
||||
workers_http: Any = ...
|
||||
workers_cron: Any = ...
|
||||
workers: Any = ...
|
||||
generation: int = ...
|
||||
queue: Any = ...
|
||||
long_polling_pid: Any = ...
|
||||
def __init__(self, app: Any) -> None: ...
|
||||
def pipe_new(self): ...
|
||||
def pipe_ping(self, pipe: Any) -> None: ...
|
||||
def signal_handler(self, sig: Any, frame: Any) -> None: ...
|
||||
def worker_spawn(self, klass: Any, workers_registry: Any): ...
|
||||
def long_polling_spawn(self) -> None: ...
|
||||
def worker_pop(self, pid: Any) -> None: ...
|
||||
def worker_kill(self, pid: Any, sig: Any) -> None: ...
|
||||
def process_signals(self) -> None: ...
|
||||
def process_zombie(self) -> None: ...
|
||||
def process_timeout(self) -> None: ...
|
||||
def process_spawn(self) -> None: ...
|
||||
def sleep(self) -> None: ...
|
||||
pipe: Any = ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self, graceful: bool = ...) -> None: ...
|
||||
def run(self, preload: Any, stop: Any): ...
|
||||
|
||||
class Worker:
|
||||
multi: Any = ...
|
||||
watchdog_time: Any = ...
|
||||
watchdog_pipe: Any = ...
|
||||
eintr_pipe: Any = ...
|
||||
watchdog_timeout: Any = ...
|
||||
ppid: Any = ...
|
||||
pid: Any = ...
|
||||
alive: bool = ...
|
||||
request_max: Any = ...
|
||||
request_count: int = ...
|
||||
def __init__(self, multi: Any) -> None: ...
|
||||
def setproctitle(self, title: str = ...) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def signal_handler(self, sig: Any, frame: Any) -> None: ...
|
||||
def signal_time_expired_handler(self, n: Any, stack: Any) -> None: ...
|
||||
def sleep(self) -> None: ...
|
||||
def check_limits(self) -> None: ...
|
||||
def process_work(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def _runloop(self) -> None: ...
|
||||
|
||||
class WorkerHTTP(Worker):
|
||||
sock_timeout: Any = ...
|
||||
def __init__(self, multi: Any) -> None: ...
|
||||
def process_request(self, client: Any, addr: Any) -> None: ...
|
||||
def process_work(self) -> None: ...
|
||||
server: Any = ...
|
||||
def start(self) -> None: ...
|
||||
|
||||
class WorkerCron(Worker):
|
||||
db_index: int = ...
|
||||
watchdog_timeout: Any = ...
|
||||
def __init__(self, multi: Any) -> None: ...
|
||||
def sleep(self) -> None: ...
|
||||
def _db_list(self): ...
|
||||
def process_work(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
|
||||
server: Any
|
||||
|
||||
def load_server_wide_modules() -> None: ...
|
||||
def _reexec(updated_modules: Optional[Any] = ...) -> None: ...
|
||||
def load_test_file_py(registry: Any, test_file: Any) -> None: ...
|
||||
def preload_registries(dbnames: Any): ...
|
||||
def start(preload: Optional[Any] = ..., stop: bool = ...): ...
|
||||
def restart() -> None: ...
|
||||
17
odoo-stubs/service/wsgi_server.pyi
Normal file
17
odoo-stubs/service/wsgi_server.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
_logger: Any
|
||||
RPC_FAULT_CODE_CLIENT_ERROR: int
|
||||
RPC_FAULT_CODE_APPLICATION_ERROR: int
|
||||
RPC_FAULT_CODE_WARNING: int
|
||||
RPC_FAULT_CODE_ACCESS_DENIED: int
|
||||
RPC_FAULT_CODE_ACCESS_ERROR: int
|
||||
|
||||
def xmlrpc_handle_exception_int(e: Any): ...
|
||||
def xmlrpc_handle_exception_string(e: Any): ...
|
||||
def _patch_xmlrpc_marshaller() -> None: ...
|
||||
def application_unproxied(environ: Any, start_response: Any): ...
|
||||
|
||||
ProxyFix: Any
|
||||
|
||||
def application(environ: Any, start_response: Any): ...
|
||||
Reference in New Issue
Block a user