mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
pywin32: add HANDLEType class (#10032)
per http://timgolden.me.uk/pywin32-docs/PyHANDLE.html these objects actually have methods, they are not ints Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user