mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
style: format code and organize imports
This commit is contained in:
parent
89c9f5ccf9
commit
8c229e5072
1 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
import itertools
|
import itertools
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -8,7 +9,6 @@ import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import git
|
import git
|
||||||
import platform
|
|
||||||
|
|
||||||
from aider.dump import dump # noqa: F401
|
from aider.dump import dump # noqa: F401
|
||||||
from aider.run_cmd import run_cmd
|
from aider.run_cmd import run_cmd
|
||||||
|
@ -336,17 +336,18 @@ def check_pip_install_extra(io, module, prompt, pip_install_cmd):
|
||||||
print("Install failed, try running this command manually:")
|
print("Install failed, try running this command manually:")
|
||||||
print(printable_shell_command(cmd))
|
print(printable_shell_command(cmd))
|
||||||
|
|
||||||
|
|
||||||
def printable_shell_command(cmd_list):
|
def printable_shell_command(cmd_list):
|
||||||
"""
|
"""
|
||||||
Convert a list of command arguments to a properly shell-escaped string.
|
Convert a list of command arguments to a properly shell-escaped string.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
cmd_list (list): List of command arguments.
|
cmd_list (list): List of command arguments.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
str: Shell-escaped command string.
|
str: Shell-escaped command string.
|
||||||
"""
|
"""
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == "Windows":
|
||||||
return subprocess.list2cmdline(cmd_list)
|
return subprocess.list2cmdline(cmd_list)
|
||||||
else:
|
else:
|
||||||
return shlex.join(cmd_list)
|
return shlex.join(cmd_list)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue