mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add subprocess.__all__ (#7390)
This commit is contained in:
@@ -7,6 +7,87 @@ from typing_extensions import Literal
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
if sys.platform == "win32":
|
||||
if sys.version_info >= (3, 7):
|
||||
__all__ = [
|
||||
"Popen",
|
||||
"PIPE",
|
||||
"STDOUT",
|
||||
"call",
|
||||
"check_call",
|
||||
"getstatusoutput",
|
||||
"getoutput",
|
||||
"check_output",
|
||||
"run",
|
||||
"CalledProcessError",
|
||||
"DEVNULL",
|
||||
"SubprocessError",
|
||||
"TimeoutExpired",
|
||||
"CompletedProcess",
|
||||
"CREATE_NEW_CONSOLE",
|
||||
"CREATE_NEW_PROCESS_GROUP",
|
||||
"STD_INPUT_HANDLE",
|
||||
"STD_OUTPUT_HANDLE",
|
||||
"STD_ERROR_HANDLE",
|
||||
"SW_HIDE",
|
||||
"STARTF_USESTDHANDLES",
|
||||
"STARTF_USESHOWWINDOW",
|
||||
"STARTUPINFO",
|
||||
"ABOVE_NORMAL_PRIORITY_CLASS",
|
||||
"BELOW_NORMAL_PRIORITY_CLASS",
|
||||
"HIGH_PRIORITY_CLASS",
|
||||
"IDLE_PRIORITY_CLASS",
|
||||
"NORMAL_PRIORITY_CLASS",
|
||||
"REALTIME_PRIORITY_CLASS",
|
||||
"CREATE_NO_WINDOW",
|
||||
"DETACHED_PROCESS",
|
||||
"CREATE_DEFAULT_ERROR_MODE",
|
||||
"CREATE_BREAKAWAY_FROM_JOB",
|
||||
]
|
||||
else:
|
||||
__all__ = [
|
||||
"Popen",
|
||||
"PIPE",
|
||||
"STDOUT",
|
||||
"call",
|
||||
"check_call",
|
||||
"getstatusoutput",
|
||||
"getoutput",
|
||||
"check_output",
|
||||
"run",
|
||||
"CalledProcessError",
|
||||
"DEVNULL",
|
||||
"SubprocessError",
|
||||
"TimeoutExpired",
|
||||
"CompletedProcess",
|
||||
"CREATE_NEW_CONSOLE",
|
||||
"CREATE_NEW_PROCESS_GROUP",
|
||||
"STD_INPUT_HANDLE",
|
||||
"STD_OUTPUT_HANDLE",
|
||||
"STD_ERROR_HANDLE",
|
||||
"SW_HIDE",
|
||||
"STARTF_USESTDHANDLES",
|
||||
"STARTF_USESHOWWINDOW",
|
||||
"STARTUPINFO",
|
||||
]
|
||||
else:
|
||||
__all__ = [
|
||||
"Popen",
|
||||
"PIPE",
|
||||
"STDOUT",
|
||||
"call",
|
||||
"check_call",
|
||||
"getstatusoutput",
|
||||
"getoutput",
|
||||
"check_output",
|
||||
"run",
|
||||
"CalledProcessError",
|
||||
"DEVNULL",
|
||||
"SubprocessError",
|
||||
"TimeoutExpired",
|
||||
"CompletedProcess",
|
||||
]
|
||||
|
||||
# We prefer to annotate inputs to methods (eg subprocess.check_call) with these
|
||||
# union types.
|
||||
# For outputs we use laborious literal based overloads to try to determine
|
||||
|
||||
Reference in New Issue
Block a user