mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 19:55:00 +00:00
style: Run linter on utils.py
This commit is contained in:
parent
59a43bd0a1
commit
0197853c39
1 changed files with 8 additions and 7 deletions
|
@ -4,16 +4,17 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
|
||||||
import pexpect
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import git
|
import git
|
||||||
|
import pexpect
|
||||||
|
|
||||||
from aider.dump import dump # noqa: F401
|
from aider.dump import dump # noqa: F401
|
||||||
|
|
||||||
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp"}
|
IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp"}
|
||||||
|
|
||||||
|
|
||||||
def run_interactive_command(command):
|
def run_interactive_command(command):
|
||||||
"""
|
"""
|
||||||
Run a shell command interactively using pexpect, capturing all output.
|
Run a shell command interactively using pexpect, capturing all output.
|
||||||
|
@ -36,7 +37,7 @@ def run_interactive_command(command):
|
||||||
|
|
||||||
# Wait for the command to finish and get the exit status
|
# Wait for the command to finish and get the exit status
|
||||||
child.close()
|
child.close()
|
||||||
return child.exitstatus, output.getvalue().decode('utf-8', errors='replace')
|
return child.exitstatus, output.getvalue().decode("utf-8", errors="replace")
|
||||||
|
|
||||||
except pexpect.ExceptionPexpect as e:
|
except pexpect.ExceptionPexpect as e:
|
||||||
error_msg = f"Error running command: {e}"
|
error_msg = f"Error running command: {e}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue