mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
fix ctypes.GetLastError (#13379)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# TODO: Allowlist entries that should be fixed
|
||||
# ============================================
|
||||
|
||||
ctypes.GetLastError # Is actually a pointer
|
||||
# alias for a class defined elsewhere,
|
||||
# mypy infers the variable has type `(*args) -> DupHandle` but stubtest infers the runtime type as <class DupHandle>
|
||||
multiprocessing.reduction.AbstractReducer.DupHandle
|
||||
|
||||
@@ -159,7 +159,14 @@ def ARRAY(typ: _CT, len: int) -> Array[_CT]: ... # Soft Deprecated, no plans to
|
||||
if sys.platform == "win32":
|
||||
def DllCanUnloadNow() -> int: ...
|
||||
def DllGetClassObject(rclsid: Any, riid: Any, ppv: Any) -> int: ... # TODO not documented
|
||||
def GetLastError() -> int: ...
|
||||
|
||||
# Actually just an instance of _NamedFuncPointer (aka _CDLLFuncPointer),
|
||||
# but we want to set a more specific __call__
|
||||
@type_check_only
|
||||
class _GetLastErrorFunctionType(_NamedFuncPointer):
|
||||
def __call__(self) -> int: ...
|
||||
|
||||
GetLastError: _GetLastErrorFunctionType
|
||||
|
||||
# Actually just an instance of _CFunctionType, but we want to set a more
|
||||
# specific __call__.
|
||||
|
||||
Reference in New Issue
Block a user