Skip to content

Commit f11eb92

Browse files
authored
subprocess: Use _CMD instead of str | bytes in getstatusoutput and getoutput (#11354)
1 parent 684f541 commit f11eb92

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/subprocess.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,12 +2564,12 @@ class Popen(Generic[AnyStr]):
25642564

25652565
# The result really is always a str.
25662566
if sys.version_info >= (3, 11):
2567-
def getstatusoutput(cmd: str | bytes, *, encoding: str | None = None, errors: str | None = None) -> tuple[int, str]: ...
2568-
def getoutput(cmd: str | bytes, *, encoding: str | None = None, errors: str | None = None) -> str: ...
2567+
def getstatusoutput(cmd: _CMD, *, encoding: str | None = None, errors: str | None = None) -> tuple[int, str]: ...
2568+
def getoutput(cmd: _CMD, *, encoding: str | None = None, errors: str | None = None) -> str: ...
25692569

25702570
else:
2571-
def getstatusoutput(cmd: str | bytes) -> tuple[int, str]: ...
2572-
def getoutput(cmd: str | bytes) -> str: ...
2571+
def getstatusoutput(cmd: _CMD) -> tuple[int, str]: ...
2572+
def getoutput(cmd: _CMD) -> str: ...
25732573

25742574
def list2cmdline(seq: Iterable[StrOrBytesPath]) -> str: ... # undocumented
25752575

0 commit comments

Comments
 (0)