From 62a8a6922cb052704198ebd28d26887d3b6d17f4 Mon Sep 17 00:00:00 2001 From: Crozzers Date: Thu, 26 May 2022 19:00:48 +0100 Subject: [PATCH] Pillow: Add missing image modes to `_Mode` type alias in `Image.pyi` stub (issue #7956) (#7960) --- stubs/Pillow/PIL/Image.pyi | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index 05cf51672..39fa932ef 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -14,7 +14,32 @@ from ._imaging import ( from .ImageFilter import Filter from .ImagePalette import ImagePalette -_Mode: TypeAlias = Literal["1", "CMYK", "F", "HSV", "I", "L", "LAB", "P", "RGB", "RGBA", "RGBX", "YCbCr"] +_Mode: TypeAlias = Literal[ + "1", + "BGR;15", + "BGR;16", + "BGR;24", + "BGR;32", + "CMYK", + "F", + "HSV", + "I", + "I;16", + "I;16B", + "I;16L", + "I;16N", + "L", + "LA", + "LAB", + "La", + "P", + "PA", + "RGB", + "RGBA", + "RGBX", + "RGBa", + "YCbCr", +] _Resample: TypeAlias = Literal[0, 1, 2, 3, 4, 5] _Size: TypeAlias = tuple[int, int] _Box: TypeAlias = tuple[int, int, int, int]