diff --git a/stubs/pywin32/win32/lib/pywintypes.pyi b/stubs/pywin32/win32/lib/pywintypes.pyi index c0f995607..ac71380df 100644 --- a/stubs/pywin32/win32/lib/pywintypes.pyi +++ b/stubs/pywin32/win32/lib/pywintypes.pyi @@ -2,7 +2,8 @@ # "KeyError: 'pywintypes'" from _typeshed import Incomplete from datetime import datetime -from typing_extensions import Literal +from typing import NoReturn +from typing_extensions import Literal, Never import _win32typing @@ -15,6 +16,15 @@ class error(Exception): class com_error(Exception): ... class UnicodeType(str): ... +class HANDLEType: + def __init__(self, *args: Never, **kwargs: Never) -> NoReturn: ... + @property + def handle(self) -> int: ... + def Close(self) -> None: ... + def close(self) -> None: ... + def Detach(self) -> None: ... + def __int__(self) -> int: ... + class TimeType(datetime): Format = datetime.strftime @@ -32,7 +42,7 @@ def ACL(__bufSize: int = ...) -> _win32typing.PyACL: ... def SID(buffer, idAuthority, subAuthorities, bufSize=...) -> _win32typing.PySID: ... def SECURITY_ATTRIBUTES() -> _win32typing.PySECURITY_ATTRIBUTES: ... def SECURITY_DESCRIPTOR() -> _win32typing.PySECURITY_DESCRIPTOR: ... -def HANDLE() -> int: ... +def HANDLE() -> HANDLEType: ... def HKEY() -> _win32typing.PyHKEY: ... def WAVEFORMATEX() -> _win32typing.PyWAVEFORMATEX: ... def TimeStamp(*args, **kwargs): ... # incomplete