diff --git a/stubs/reportlab/METADATA.toml b/stubs/reportlab/METADATA.toml index fa3e5c756da6..7be42a084bdb 100644 --- a/stubs/reportlab/METADATA.toml +++ b/stubs/reportlab/METADATA.toml @@ -1,4 +1,4 @@ -version = "4.2.0" +version = "4.2.2" # GitHub mirror of https://hg.reportlab.com/hg-public/reportlab/file upstream_repository = "https://github.com/MrBitBucket/reportlab-mirror" diff --git a/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi b/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi index a44a11bf15fc..c51454be9b57 100644 --- a/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi +++ b/stubs/reportlab/reportlab/lib/rl_safe_eval.pyi @@ -1,21 +1,23 @@ import ast import math +import re import time from _typeshed import Incomplete from collections.abc import Generator from typing import NoReturn -eval_debug: Incomplete -strTypes: Incomplete -isPy39: Incomplete -haveNameConstant: Incomplete +eval_debug: int +strTypes: tuple[type[bytes], type[str]] +isPy39: bool +isPy313: bool +haveNameConstant: bool class BadCode(ValueError): ... -augOps: Incomplete -__allowed_magic_methods__: Incomplete -__rl_unsafe__: Incomplete -__rl_unsafe_re__: Incomplete +augOps: dict[ast.operator, str] +__allowed_magic_methods__: frozenset[str] +__rl_unsafe__: frozenset[str] +__rl_unsafe_re__: re.Pattern[str] def copy_locations(new_node, old_node) -> None: ... @@ -175,7 +177,12 @@ class __RL_SAFE_ENV__: real_bi: Incomplete bi_replace: Incomplete __rl_builtins__: Incomplete - def __init__(self, timeout: Incomplete | None = None, allowed_magic_methods: Incomplete | None = None) -> None: ... + def __init__( + self, + timeout: Incomplete | None = None, + allowed_magic_methods: Incomplete | None = None, + allowed_magic_names: Incomplete | None = None, + ) -> None: ... def __rl_type__(self, *args): ... def __rl_check__(self) -> None: ... def __rl_sd__(self, obj): ... @@ -194,10 +201,10 @@ class __RL_SAFE_ENV__: def __rl_reversed__(self, seq): ... def __rl_range__(self, start, *args): ... def __rl_set__(self, it): ... - def __rl_frozenset__(self, it): ... + def __rl_frozenset__(self, it=()): ... def __rl_iter_unpack_sequence__(self, it, spec, _getiter_) -> Generator[Incomplete, None, None]: ... def __rl_unpack_sequence__(self, it, spec, _getiter_): ... - def __rl_is_allowed_name__(self, name) -> None: ... + def __rl_is_allowed_name__(self, name, crash: bool = True) -> bool: ... def __rl_getattr__(self, obj, a, *args): ... def __rl_getitem__(self, obj, a): ... __rl_tmax__: int @@ -229,6 +236,7 @@ class __RL_SAFE_ENV__: timeout: Incomplete | None = None, allowed_magic_methods: Incomplete | None = None, __frame_depth__: int = 3, + allowed_magic_names: Incomplete | None = None, ): ... class __rl_safe_eval__: @@ -242,6 +250,7 @@ class __rl_safe_eval__: l: Incomplete | None = None, timeout: Incomplete | None = None, allowed_magic_methods: Incomplete | None = None, + allowed_magic_names: Incomplete | None = None, ): ... class __rl_safe_exec__(__rl_safe_eval__): @@ -251,3 +260,6 @@ def rl_extended_literal_eval(expr, safe_callables: Incomplete | None = None, saf rl_safe_exec: __rl_safe_exec__ rl_safe_eval: __rl_safe_eval__ + +def __fix_set__(value, default=...): ... +def rl_less_safe_eval(expr, NS): ... diff --git a/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi b/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi index 57e90c6ebeae..0fb9e8ea44d3 100644 --- a/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi +++ b/stubs/reportlab/reportlab/pdfbase/pdfdoc.pyi @@ -625,3 +625,9 @@ class PDFRadialShading(PDFShading): otherkw: Incomplete def __init__(self, x0, y0, r0, x1, y1, r1, Function, ColorSpace, **kw) -> None: ... def Dict(self, document): ... + +class XMP(PDFStream): + def __init__(self, path: Incomplete | None = None, creator: Incomplete | None = None) -> None: ... + def makeContent(self, doc): ... + # Param name is changed from the base class: + def format(self, doc): ...