From e76e6811e10d42c376f30dd6c6750143b4b2cdbf Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 7 Dec 2023 05:40:00 -0500 Subject: [PATCH] Fix `pywin32`'s `PyCBitmap.GetBitmapBits` method (#11108) --- stubs/pywin32/_win32typing.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stubs/pywin32/_win32typing.pyi b/stubs/pywin32/_win32typing.pyi index c36b758ba..58e76d331 100644 --- a/stubs/pywin32/_win32typing.pyi +++ b/stubs/pywin32/_win32typing.pyi @@ -4801,7 +4801,12 @@ class PyCBitmap: arg1: tuple[Incomplete, Incomplete, Incomplete, Incomplete], ) -> None: ... def GetInfo(self): ... - def GetBitmapBits(self, asString: int = ...) -> str: ... + @overload + def GetBitmapBits(self, __asString: Literal[False] = False) -> tuple[int, ...]: ... + @overload + def GetBitmapBits(self, __asString: Literal[True]) -> bytes: ... + @overload + def GetBitmapBits(self, __asString: bool) -> tuple[int, ...] | bytes: ... def SaveBitmapFile(self, dcObject: PyCDC, Filename: str): ... class PyCBrush: