mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Fix stubtest failures on _winapi (#4091)
This commit is contained in:
@@ -50,7 +50,7 @@ WAIT_ABANDONED_0: int
|
||||
WAIT_OBJECT_0: int
|
||||
WAIT_TIMEOUT: int
|
||||
|
||||
def CloseHandle(handle: int) -> None: ...
|
||||
def CloseHandle(__handle: int) -> None: ...
|
||||
|
||||
@overload
|
||||
def ConnectNamedPipe(handle: int, overlapped: Literal[True]) -> Overlapped: ...
|
||||
@@ -59,23 +59,23 @@ def ConnectNamedPipe(handle: int, overlapped: Literal[False] = ...) -> None: ...
|
||||
@overload
|
||||
def ConnectNamedPipe(handle: int, overlapped: bool) -> Optional[Overlapped]: ...
|
||||
|
||||
def CreateFile(file_name: str, desired_access: int, share_mode: int, security_attributes: int, creation_disposition: int, flags_and_attributes: int, template_file: int) -> int: ...
|
||||
def CreateJunction(src_path: str, dest_path: str) -> None: ...
|
||||
def CreateNamedPipe(name: str, open_mode: int, pipe_mode: int, max_instances: int, out_buffer_size: int, in_buffer_size: int, default_timeout: int, security_attributes: int) -> int: ...
|
||||
def CreatePipe(pipe_attrs: Any, size: int) -> Tuple[int, int]: ...
|
||||
def CreateProcess(application_name: Optional[str], command_line: Optional[str], proc_attrs: Any, thread_attrs: Any, inherit_handles: bool, creation_flags: int, env_mapping: Dict[str, str], cwd: Optional[str], startup_info: Any) -> Tuple[int, int, int, int]: ...
|
||||
def DuplicateHandle(source_process_handle: int, source_handle: int, target_process_handle: int, desired_access: int, inherit_handle: bool, options: int = ...) -> int: ...
|
||||
def ExitProcess(ExitCode: int) -> NoReturn: ...
|
||||
def CreateFile(__file_name: str, __desired_access: int, __share_mode: int, __security_attributes: int, __creation_disposition: int, __flags_and_attributes: int, __template_file: int) -> int: ...
|
||||
def CreateJunction(__src_path: str, __dst_path: str) -> None: ...
|
||||
def CreateNamedPipe(__name: str, __open_mode: int, __pipe_mode: int, __max_instances: int, __out_buffer_size: int, __in_buffer_size: int, __default_timeout: int, __security_attributes: int) -> int: ...
|
||||
def CreatePipe(__pipe_attrs: Any, __size: int) -> Tuple[int, int]: ...
|
||||
def CreateProcess(__application_name: Optional[str], __command_line: Optional[str], __proc_attrs: Any, __thread_attrs: Any, __inherit_handles: bool, __creation_flags: int, __env_mapping: Dict[str, str], __current_directory: Optional[str], __startup_info: Any) -> Tuple[int, int, int, int]: ...
|
||||
def DuplicateHandle(__source_process_handle: int, __source_handle: int, __target_process_handle: int, __desired_access: int, __inherit_handle: bool, __options: int = ...) -> int: ...
|
||||
def ExitProcess(__ExitCode: int) -> NoReturn: ...
|
||||
def GetACP() -> int: ...
|
||||
def GetFileType(handle: int) -> int: ...
|
||||
def GetCurrentProcess() -> int: ...
|
||||
def GetExitCodeProcess(process: int) -> int: ...
|
||||
def GetExitCodeProcess(__process: int) -> int: ...
|
||||
def GetLastError() -> int: ...
|
||||
def GetModuleFileName(module_handle: int) -> str: ...
|
||||
def GetStdHandle(std_handle: int) -> int: ...
|
||||
def GetModuleFileName(__module_handle: int) -> str: ...
|
||||
def GetStdHandle(__std_handle: int) -> int: ...
|
||||
def GetVersion() -> int: ...
|
||||
def OpenProcess(desired_access: int, inherit_handle: bool, process_id: int) -> int: ...
|
||||
def PeekNamedPipe(handle: int, size: int = ...) -> Union[Tuple[int, int], Tuple[bytes, int, int]]: ...
|
||||
def OpenProcess(__desired_access: int, __inherit_handle: bool, __process_id: int) -> int: ...
|
||||
def PeekNamedPipe(__handle: int, __size: int = ...) -> Union[Tuple[int, int], Tuple[bytes, int, int]]: ...
|
||||
|
||||
@overload
|
||||
def ReadFile(handle: int, size: int, overlapped: Literal[True]) -> Tuple[Overlapped, int]: ...
|
||||
@@ -84,23 +84,23 @@ def ReadFile(handle: int, size: int, overlapped: Literal[False] = ...) -> Tuple[
|
||||
@overload
|
||||
def ReadFile(handle: int, size: int, overlapped: Union[int, bool]) -> Tuple[Any, int]: ...
|
||||
|
||||
def SetNamedPipeHandleState(named_pipe: int, mode: Optional[int], max_collection_count: Optional[int], collect_data_timeout: Optional[int]) -> None: ...
|
||||
def TerminateProcess(handle: int, exit_code: int) -> None: ...
|
||||
def WaitForMultipleObjects(handle_seq: Sequence[int], wait_flag: bool, milliseconds: int = ...) -> int: ...
|
||||
def WaitForSingleObject(handle: int, milliseconds: int) -> int: ...
|
||||
def WaitNamedPipe(name: str, timeout: int) -> None: ...
|
||||
def SetNamedPipeHandleState(__named_pipe: int, __mode: Optional[int], __max_collection_count: Optional[int], __collect_data_timeout: Optional[int]) -> None: ...
|
||||
def TerminateProcess(__handle: int, __exit_code: int) -> None: ...
|
||||
def WaitForMultipleObjects(__handle_seq: Sequence[int], __wait_flag: bool, __milliseconds: int = ...) -> int: ...
|
||||
def WaitForSingleObject(__handle: int, __milliseconds: int) -> int: ...
|
||||
def WaitNamedPipe(__name: str, __timeout: int) -> None: ...
|
||||
|
||||
|
||||
@overload
|
||||
def WriteFile(handle: int, buffer: bytes, overlapped: Literal[True]) -> Tuple[Overlapped, int]: ...
|
||||
@overload
|
||||
def WriteFile(handle: int, buffer: bytes, overlapped: Literal[False]) -> Tuple[int, int]: ...
|
||||
def WriteFile(handle: int, buffer: bytes, overlapped: Literal[False] = ...) -> Tuple[int, int]: ...
|
||||
@overload
|
||||
def WriteFile(handle: int, buffer: bytes, overlapped: Union[int, bool]) -> Tuple[Any, int]: ...
|
||||
|
||||
|
||||
class Overlapped:
|
||||
event: int = ...
|
||||
def GetOverlappedResult(self, wait: bool) -> Tuple[int, int]: ...
|
||||
def GetOverlappedResult(self, __wait: bool) -> Tuple[int, int]: ...
|
||||
def cancel(self) -> None: ...
|
||||
def getbuffer(self) -> Optional[bytes]: ...
|
||||
|
||||
Reference in New Issue
Block a user