Skip to content

Commit 89b49d2

Browse files
authored
Have win32gui.SystemParametersInfo return Any (#13438)
1 parent 5944a68 commit 89b49d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: stubs/pywin32/win32/win32gui.pyi

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
22
from collections.abc import Callable
3-
from typing import Literal, TypeVar
3+
from typing import Any, Literal, TypeVar
44

55
import _win32typing
66
from win32.lib.pywintypes import error as error
@@ -448,7 +448,9 @@ def GetOpenFileNameW(
448448
DefExt: Incomplete | None = ...,
449449
TemplateName: _win32typing.PyResourceId | None = ...,
450450
) -> tuple[Incomplete, Incomplete, Incomplete]: ...
451-
def SystemParametersInfo(Action, Param: Incomplete | None = ..., WinIni: int = ...) -> None: ...
451+
452+
# Any: Return type is too varied based on Action. This would require an overload for all win32con.SPI_* literals
453+
def SystemParametersInfo(Action: int, Param: Incomplete | None = ..., WinIni: int = ...) -> Any: ...
452454
def SetLayeredWindowAttributes(hwnd: int, Key, Alpha, Flags) -> None: ...
453455
def GetLayeredWindowAttributes(hwnd: int) -> tuple[Incomplete, Incomplete, Incomplete]: ...
454456
def UpdateLayeredWindow(

0 commit comments

Comments
 (0)