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:
@@ -225,14 +225,14 @@ class Dispatcher(ABC):
|
||||
def dispatch(self, endpoint, args): ...
|
||||
def post_dispatch(self, response: werkzeug.Response) -> None: ...
|
||||
@abstractmethod
|
||||
def handle_error(self, exc: Exception): ...
|
||||
def handle_error(self, exc: Exception) -> Callable: ...
|
||||
|
||||
class HttpDispatcher(Dispatcher):
|
||||
routing_type: str
|
||||
@classmethod
|
||||
def is_compatible_with(cls, request: Request) -> Literal[True]: ...
|
||||
def dispatch(self, endpoint, args): ...
|
||||
def handle_error(self, exc: Exception): ...
|
||||
def handle_error(self, exc: Exception) -> Callable: ...
|
||||
|
||||
class JsonRPCDispatcher(Dispatcher):
|
||||
routing_type: str
|
||||
@@ -241,7 +241,7 @@ class JsonRPCDispatcher(Dispatcher):
|
||||
@classmethod
|
||||
def is_compatible_with(cls, request: Request) -> bool: ...
|
||||
def dispatch(self, endpoint, args): ...
|
||||
def handle_error(self, exc: Exception) -> Response: ...
|
||||
def handle_error(self, exc: Exception) -> Callable: ...
|
||||
def _response(self, result: Any | None = ..., error: Any | None = ...) -> Response: ...
|
||||
|
||||
class Application:
|
||||
|
||||
@@ -2,7 +2,7 @@ import threading
|
||||
from collections import defaultdict, deque
|
||||
from collections.abc import Mapping
|
||||
from threading import RLock
|
||||
from typing import Any, Callable, ClassVar, Iterable, Iterator
|
||||
from typing import Any, Callable, ClassVar, Collection, Iterable, Iterator
|
||||
|
||||
from .graph import Node
|
||||
from ..models import BaseModel
|
||||
@@ -22,6 +22,7 @@ class Registry(Mapping[str, type[BaseModel]]):
|
||||
models: dict[str, type[BaseModel]]
|
||||
_sql_constraints: set
|
||||
_init: bool
|
||||
_database_translated_fields: Collection[str]
|
||||
_assertion_report: OdooTestResult
|
||||
_fields_by_model: Any
|
||||
_ordinary_tables: set[str] | None
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import logging.handlers
|
||||
import warnings
|
||||
from logging import Logger, LogRecord
|
||||
from typing import TextIO
|
||||
from typing import IO, TextIO
|
||||
|
||||
def log(logger: Logger, level: int, prefix: str, msg, depth: int | None = ...) -> None: ...
|
||||
|
||||
class WatchedFileHandler(logging.handlers.WatchedFileHandler):
|
||||
errors: None
|
||||
_builtin_open: None
|
||||
def __init__(self, filename: str) -> None: ...
|
||||
def _open(self) -> IO: ...
|
||||
|
||||
class PostgreSQLHandler(logging.Handler):
|
||||
def emit(self, record: LogRecord) -> None: ...
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ class RequestHandler(werkzeug.serving.WSGIRequestHandler):
|
||||
def setup(self) -> None: ...
|
||||
protocol_version: str
|
||||
def make_environ(self) -> dict[str, Any]: ...
|
||||
close_connection: bool
|
||||
def send_header(self, keyword, value) -> None: ...
|
||||
|
||||
class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer):
|
||||
max_http_threads: Any
|
||||
|
||||
@@ -18,6 +18,7 @@ PdfFileWriter = BrandedFileWriter
|
||||
|
||||
def merge_pdf(pdf_data: Iterable[bytes]) -> bytes: ...
|
||||
def rotate_pdf(pdf: bytes) -> bytes: ...
|
||||
def to_pdf_stream(attachment: 'odoo.model.ir_attachment') -> BytesIO: ...
|
||||
def add_banner(pdf_stream: str | BinaryIO, text: str | None = ..., logo: bool = ..., thickness: float = ...) -> BytesIO: ...
|
||||
|
||||
class OdooPdfFileReader(PdfFileReader):
|
||||
|
||||
Reference in New Issue
Block a user