mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
style: Fix import order and formatting in editblock_coder.py
This commit is contained in:
parent
4917054518
commit
0006d70a7c
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
import difflib
|
import difflib
|
||||||
import math
|
import math
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -13,8 +14,6 @@ from .base_coder import Coder
|
||||||
from .editblock_prompts import EditBlockPrompts
|
from .editblock_prompts import EditBlockPrompts
|
||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
class EditBlockCoder(Coder):
|
class EditBlockCoder(Coder):
|
||||||
"""A coder that uses search/replace blocks for code modifications."""
|
"""A coder that uses search/replace blocks for code modifications."""
|
||||||
|
|
||||||
|
@ -30,10 +29,11 @@ class EditBlockCoder(Coder):
|
||||||
return edits
|
return edits
|
||||||
|
|
||||||
def run_interactive_subprocess(self, command):
|
def run_interactive_subprocess(self, command):
|
||||||
if os.name == 'posix': # Unix-like systems (Linux, macOS)
|
if os.name == "posix": # Unix-like systems (Linux, macOS)
|
||||||
import pty
|
import pty
|
||||||
|
|
||||||
return pty.spawn(command)
|
return pty.spawn(command)
|
||||||
elif os.name == 'nt': # Windows
|
elif os.name == "nt": # Windows
|
||||||
return subprocess.run(command, shell=True)
|
return subprocess.run(command, shell=True)
|
||||||
else:
|
else:
|
||||||
raise OSError("Unsupported operating system")
|
raise OSError("Unsupported operating system")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue