From c9e6bd2df9d2aa05927ce0576c24cbb5740d7361 Mon Sep 17 00:00:00 2001 From: Robert Schweizer Date: Mon, 10 Oct 2022 16:26:07 +0200 Subject: [PATCH] Allow PIL.Image.MAX_IMAGE_PIXELS to be None (#8876) `_decompression_bomb_check()` explicitly checks for `None` and handles it as "unlimited". --- stubs/Pillow/PIL/Image.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index ee5a4c3e7..6fcedd6f0 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -39,7 +39,7 @@ CONTAINER: Literal[2] class DecompressionBombWarning(RuntimeWarning): ... class DecompressionBombError(Exception): ... -MAX_IMAGE_PIXELS: int +MAX_IMAGE_PIXELS: int | None NONE: Literal[0]