From 55f15427bda8b0bbeaa7e59f9af3bf6fb187e7ff Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Mon, 13 Nov 2017 06:44:51 +0000 Subject: [PATCH] Refine stdlib commands module (add mkarg(), mk2arg(), correct get*()) (#1739) --- stdlib/2/commands.pyi | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/stdlib/2/commands.pyi b/stdlib/2/commands.pyi index 864dbf4ff..e321f0844 100644 --- a/stdlib/2/commands.pyi +++ b/stdlib/2/commands.pyi @@ -1,5 +1,12 @@ -from typing import Tuple +from typing import overload, AnyStr, Text, Tuple -def getstatus(file: str) -> str: ... -def getoutput(cmd: str) -> str: ... -def getstatusoutput(cmd: str) -> Tuple[int, str]: ... +def getstatus(file: Text) -> str: ... +def getoutput(cmd: Text) -> str: ... +def getstatusoutput(cmd: Text) -> Tuple[int, str]: ... + +@overload +def mk2arg(head: bytes, x: bytes) -> bytes: ... +@overload +def mk2arg(head: Text, x: Text) -> Text: ... + +def mkarg(x: AnyStr) -> AnyStr: ...