From c5d4a6f8104af1eaa0c9dfd8ea7025a673de731e Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 2 Nov 2023 15:38:49 +0300 Subject: mypy: Fix typing errors. --- gn_auth/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gn_auth/commands.py') diff --git a/gn_auth/commands.py b/gn_auth/commands.py index cc00413..02bed10 100644 --- a/gn_auth/commands.py +++ b/gn_auth/commands.py @@ -44,7 +44,9 @@ Returns the name of the specific redis hash for the specific task. conn.hset(name=unique_id, key="env", value=json.dumps(env)) return unique_id -def run_cmd(cmd: str, success_codes: Tuple = (0,), env: str = None) -> Dict: +def run_cmd(cmd: str, + success_codes: Tuple = (0,), + env: Optional[str] = None) -> Dict: """Run CMD and return the CMD's status code and output as a dict""" parsed_cmd = json.loads(cmd) parsed_env = (json.loads(env) if env is not None else None) -- cgit v1.2.3