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,71 +1,79 @@
|
||||
from typing import Any
|
||||
from datetime import datetime
|
||||
from threading import Thread
|
||||
from types import FrameType
|
||||
from typing import Any, Callable, ContextManager, Generic, Iterable, TypeVar
|
||||
|
||||
_logger: Any
|
||||
from ..sql_db import Cursor
|
||||
|
||||
def _format_frame(frame): ...
|
||||
def _format_stack(stack): ...
|
||||
def get_current_frame(thread: Any | None = ...): ...
|
||||
def _get_stack_trace(frame, limit_frame: Any | None = ...): ...
|
||||
def stack_size(): ...
|
||||
def make_session(name: str = ...): ...
|
||||
_T = TypeVar('_T')
|
||||
|
||||
real_datetime_now: Callable[..., datetime]
|
||||
real_time: Callable[[], float]
|
||||
|
||||
def _format_frame(frame: FrameType) -> tuple[str, int, str, str]: ...
|
||||
def _format_stack(stack: Iterable) -> list[list]: ...
|
||||
def get_current_frame(thread: Thread | None = ...) -> FrameType: ...
|
||||
def _get_stack_trace(frame: FrameType, limit_frame: FrameType | None = ...) -> list[tuple[str, int, str, str]]: ...
|
||||
def stack_size() -> int: ...
|
||||
def make_session(name: str = ...) -> str: ...
|
||||
def force_hook() -> None: ...
|
||||
|
||||
class Collector:
|
||||
name: Any
|
||||
_registry: Any
|
||||
name: str | None
|
||||
_registry: dict[str, Any]
|
||||
@classmethod
|
||||
def __init_subclass__(cls) -> None: ...
|
||||
@classmethod
|
||||
def make(cls, name, *args, **kwargs): ...
|
||||
def make(cls, name: str, *args, **kwargs): ...
|
||||
_processed: bool
|
||||
_entries: Any
|
||||
profiler: Any
|
||||
_entries: list[dict]
|
||||
profiler: Profiler | None
|
||||
def __init__(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def add(self, entry: Any | None = ..., frame: Any | None = ...) -> None: ...
|
||||
def _get_stack_trace(self, frame: Any | None = ...): ...
|
||||
def add(self, entry: dict | None = ..., frame: FrameType | None = ...) -> None: ...
|
||||
def _get_stack_trace(self, frame: FrameType | None = ...) -> list[tuple[str, int, str, str]]: ...
|
||||
def post_process(self) -> None: ...
|
||||
@property
|
||||
def entries(self): ...
|
||||
def entries(self) -> list[dict]: ...
|
||||
|
||||
class SQLCollector(Collector):
|
||||
name: str
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def hook(self, cr, query, params, query_start, query_time) -> None: ...
|
||||
def hook(self, cr: Cursor, query, params, query_start, query_time) -> None: ...
|
||||
|
||||
class PeriodicCollector(Collector):
|
||||
name: str
|
||||
active: bool
|
||||
frame_interval: Any
|
||||
thread: Any
|
||||
last_frame: Any
|
||||
frame_interval: float
|
||||
thread: Thread
|
||||
last_frame: FrameType | None
|
||||
def __init__(self, interval: float = ...) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def add(self, entry: Any | None = ..., frame: Any | None = ...) -> None: ...
|
||||
def add(self, entry: dict | None = ..., frame: FrameType | None = ...) -> None: ...
|
||||
|
||||
class SyncCollector(Collector):
|
||||
name: str
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def hook(self, _frame, event, _arg: Any | None = ...): ...
|
||||
def _get_stack_trace(self, frame: Any | None = ...) -> None: ...
|
||||
def hook(self, _frame: FrameType, event: str, _arg: Any | None = ...): ...
|
||||
def _get_stack_trace(self, frame: FrameType | None = ...) -> None: ...
|
||||
def post_process(self) -> None: ...
|
||||
|
||||
class QwebTracker:
|
||||
@classmethod
|
||||
def wrap_render(cls, method_render): ...
|
||||
def wrap_render(cls, method_render: _T) -> _T: ...
|
||||
@classmethod
|
||||
def wrap_compile(cls, method_compile): ...
|
||||
def wrap_compile(cls, method_compile: _T) -> _T: ...
|
||||
@classmethod
|
||||
def wrap_compile_directive(cls, method_compile_directive): ...
|
||||
def wrap_compile_directive(cls, method_compile_directive: _T) -> _T: ...
|
||||
execution_context_enabled: Any
|
||||
qweb_hooks: Any
|
||||
context_stack: Any
|
||||
cr: Any
|
||||
qweb_hooks: Iterable[Callable]
|
||||
context_stack: list[ExecutionContext]
|
||||
cr: Cursor
|
||||
view_id: Any
|
||||
def __init__(self, view_id, arch, cr) -> None: ...
|
||||
def enter_directive(self, directive, attrib, xpath) -> None: ...
|
||||
@@ -73,17 +81,17 @@ class QwebTracker:
|
||||
|
||||
class QwebCollector(Collector):
|
||||
name: str
|
||||
events: Any
|
||||
hook: Any
|
||||
events: list
|
||||
hook: Callable
|
||||
def __init__(self) -> None: ...
|
||||
def _get_directive_profiling_name(self, directive, attrib): ...
|
||||
def _get_directive_profiling_name(self, directive: str, attrib: dict) -> str: ...
|
||||
def start(self) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def post_process(self) -> None: ...
|
||||
|
||||
class ExecutionContext:
|
||||
context: Any
|
||||
previous_context: Any
|
||||
context: dict
|
||||
previous_context: tuple | None
|
||||
def __init__(self, **context) -> None: ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, *_args) -> None: ...
|
||||
@@ -92,26 +100,29 @@ class Profiler:
|
||||
start_time: int
|
||||
duration: int
|
||||
profile_session: Any
|
||||
description: Any
|
||||
init_frame: Any
|
||||
init_stack_trace: Any
|
||||
init_thread: Any
|
||||
disable_gc: Any
|
||||
filecache: Any
|
||||
description: str | None
|
||||
init_frame: FrameType | None
|
||||
init_stack_trace: list[tuple[str, int, str, str]] | None
|
||||
init_thread: Thread | None
|
||||
disable_gc: bool
|
||||
filecache: dict
|
||||
params: Any
|
||||
db: Any
|
||||
collectors: Any
|
||||
def __init__(self, collectors: Any | None = ..., db=..., profile_session: Any | None = ..., description: Any | None = ..., disable_gc: bool = ..., params: Any | None = ...) -> None: ...
|
||||
def __enter__(self): ...
|
||||
profile_id: Any
|
||||
db: str | None
|
||||
collectors: list[Collector]
|
||||
def __init__(self, collectors: list[str | Collector] | None = ..., db: str | None = ...,
|
||||
profile_session: Any | None = ..., description: str | None = ..., disable_gc: bool = ...,
|
||||
params: Any | None = ...) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def _add_file_lines(self, stack) -> None: ...
|
||||
def entry_count(self): ...
|
||||
def format_path(self, path): ...
|
||||
def json(self): ...
|
||||
def _add_file_lines(self, stack: list[tuple[str, int, str, str]]) -> None: ...
|
||||
def entry_count(self) -> int: ...
|
||||
def format_path(self, path: str) -> str: ...
|
||||
def json(self) -> str: ...
|
||||
|
||||
class Nested:
|
||||
profiler: Any
|
||||
context_manager: Any
|
||||
def __init__(self, profiler, context_manager) -> None: ...
|
||||
def __enter__(self): ...
|
||||
class Nested(Generic[_T]):
|
||||
profiler: Profiler
|
||||
context_manager: ContextManager[_T]
|
||||
def __init__(self, profiler: Profiler, context_manager: ContextManager) -> None: ...
|
||||
def __enter__(self) -> _T: ...
|
||||
def __exit__(self, exc_type, exc_value, traceback): ...
|
||||
|
||||
Reference in New Issue
Block a user