diff --git a/stubs/reportlab/@tests/stubtest_allowlist.txt b/stubs/reportlab/@tests/stubtest_allowlist.txt index da619dcf1c38..4e5160000e35 100644 --- a/stubs/reportlab/@tests/stubtest_allowlist.txt +++ b/stubs/reportlab/@tests/stubtest_allowlist.txt @@ -104,7 +104,8 @@ reportlab.graphics.barcode.eanbc.isEanString # Error: is not present at runtime # ================================ -# PropertySet can have arbitrary attributes, so we add a __getattr_ +# These can have arbitrary attributes, so we add a __getattr__ +reportlab.lib.abag.ABag.__getattr__ reportlab.lib.styles.PropertySet.__getattr__ # Only exists on renderPM backend diff --git a/stubs/reportlab/reportlab/lib/abag.pyi b/stubs/reportlab/reportlab/lib/abag.pyi index b9b4b29db9e0..4c7d4d6851a0 100644 --- a/stubs/reportlab/reportlab/lib/abag.pyi +++ b/stubs/reportlab/reportlab/lib/abag.pyi @@ -3,7 +3,9 @@ from typing_extensions import Self __version__: Final[str] -# NOTE: just holds an arbitrary collection of attributes, so we subclass Any -class ABag(Any): +class ABag: def __init__(self, **attr: Any) -> None: ... def clone(self, **attr: Any) -> Self: ... + # ABag can have arbitrary attributes + def __getattr__(self, name: str) -> Any: ... + def __setattr__(self, name: str, value: Any) -> None: ...