From 89b49d207b93b66e9663df8c3f8a6ced570e35b0 Mon Sep 17 00:00:00 2001 From: Avasam Date: Sun, 26 Jan 2025 23:33:52 -0500 Subject: [PATCH] Have `win32gui.SystemParametersInfo` return `Any` (#13438) --- stubs/pywin32/win32/win32gui.pyi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stubs/pywin32/win32/win32gui.pyi b/stubs/pywin32/win32/win32gui.pyi index cd341a68ccc6..99e95b327887 100644 --- a/stubs/pywin32/win32/win32gui.pyi +++ b/stubs/pywin32/win32/win32gui.pyi @@ -1,6 +1,6 @@ from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer from collections.abc import Callable -from typing import Literal, TypeVar +from typing import Any, Literal, TypeVar import _win32typing from win32.lib.pywintypes import error as error @@ -448,7 +448,9 @@ def GetOpenFileNameW( DefExt: Incomplete | None = ..., TemplateName: _win32typing.PyResourceId | None = ..., ) -> tuple[Incomplete, Incomplete, Incomplete]: ... -def SystemParametersInfo(Action, Param: Incomplete | None = ..., WinIni: int = ...) -> None: ... + +# Any: Return type is too varied based on Action. This would require an overload for all win32con.SPI_* literals +def SystemParametersInfo(Action: int, Param: Incomplete | None = ..., WinIni: int = ...) -> Any: ... def SetLayeredWindowAttributes(hwnd: int, Key, Alpha, Flags) -> None: ... def GetLayeredWindowAttributes(hwnd: int) -> tuple[Incomplete, Incomplete, Incomplete]: ... def UpdateLayeredWindow(