From e1c8a25e2ec4b5b541a4835dd050bdce2b2b9528 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 30 Aug 2024 08:32:23 -0700 Subject: [PATCH] style: format code with linter --- aider/run_cmd.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/aider/run_cmd.py b/aider/run_cmd.py index 390da60f4..e4aa843cb 100644 --- a/aider/run_cmd.py +++ b/aider/run_cmd.py @@ -10,7 +10,12 @@ import pexpect def run_cmd(command): import sys - if False and sys.stdin.isatty() and hasattr(pexpect, "spawn") and platform.system() != "Windows": + if ( + False + and sys.stdin.isatty() + and hasattr(pexpect, "spawn") + and platform.system() != "Windows" + ): return run_cmd_pexpect(command) return run_cmd_subprocess(command) @@ -27,16 +32,16 @@ def run_cmd_subprocess(command): encoding=sys.stdout.encoding, errors="replace", bufsize=1, - universal_newlines=True + universal_newlines=True, ) output = [] for line in process.stdout: - print(line, end='') # Print the line in real-time + print(line, end="") # Print the line in real-time output.append(line) # Store the line for later use process.wait() - return process.returncode, ''.join(output) + return process.returncode, "".join(output) except Exception as e: return 1, str(e)