Add static typing for utils.popenReadLines

This commit is contained in:
Romain Failliot 2022-01-09 15:11:05 -05:00
parent 3b17dababd
commit 133011bbf5
1 changed files with 6 additions and 1 deletions

View File

@ -234,7 +234,12 @@ def _strip_eols(ss: List[str]) -> List[str]:
# use popen to read the output of a command
def popenReadLines(cwd, cmd, prefs, bash_pref, success_results=None):
def popenReadLines(
cwd: str,
cmd: List[str],
prefs: Preferences,
bash_pref: str,
success_results: List[int] = None) -> List[str]:
return _strip_eols(splitlines(popenRead(
cwd, cmd, prefs, bash_pref, success_results).decode('utf-8', errors='ignore')))