Update stubs

This commit is contained in:
Trinh Anh Ngoc
2024-08-05 15:31:55 +07:00
parent 4cccc17344
commit 5670150ba2
4 changed files with 9 additions and 6 deletions

View File

@@ -20,9 +20,7 @@ from .tools.translate import _ as _
from .tools.translate import _lt as _lt
MIN_PY_VERSION: tuple[int, ...]
evented: bool
iso8859_8: CodecInfo
iso8859_8ie_re: Pattern
MAX_PY_VERSION: tuple[int, ...]
SUPERUSER_ID: int
def registry(database_name: str | None = ...) -> Registry: ...

View File

@@ -6,6 +6,7 @@ from ..sql_db import Cursor
_CallableT = TypeVar("_CallableT", bound=Callable)
PG_CONCURRENCY_ERRORS_TO_RETRY: tuple[str, str, str]
PG_CONCURRENCY_EXCEPTIONS_TO_RETRY: tuple[Exception, ...]
MAX_TRIES_ON_CONCURRENCY_FAILURE: int
def dispatch(method: str, params): ...

View File

@@ -5,7 +5,7 @@ from lxml.etree import _Element
from ..api import Environment
safe_eval: Callable
def safe_eval(expr, ctx: dict = ...): ...
class ParseError(Exception): ...

View File

@@ -18,7 +18,9 @@ class ImageProcess:
def image_quality(
self, quality: int = ..., output_format: str = ...
) -> bytes | Literal[False]: ...
def resize(self, max_width: int = ..., max_height: int = ...) -> ImageProcess: ...
def resize(
self, max_width: int = ..., max_height: int = ..., expand: bool = ...
) -> ImageProcess: ...
def crop_resize(
self,
max_width: int,
@@ -26,13 +28,15 @@ class ImageProcess:
center_x: float = ...,
center_y: float = ...,
) -> ImageProcess: ...
def colorize(self) -> ImageProcess: ...
def colorize(self, color: tuple | None = ...) -> ImageProcess: ...
def add_padding(self, padding: int) -> ImageProcess: ...
def image_process(
source: bytes,
size: tuple[int, int] = ...,
verify_resolution: bool = ...,
quality: int = ...,
expand: bool = ...,
crop: str | None = ...,
colorize: bool = ...,
output_format: str = ...,