From 133011bbf508b0ed4800a1f41b2e74fbe4bb0ec8 Mon Sep 17 00:00:00 2001 From: Romain Failliot Date: Sun, 9 Jan 2022 15:11:05 -0500 Subject: [PATCH] Add static typing for utils.popenReadLines --- src/diffuse/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/diffuse/utils.py b/src/diffuse/utils.py index f566657..27e9a99 100644 --- a/src/diffuse/utils.py +++ b/src/diffuse/utils.py @@ -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')))