mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +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 math
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
@ -13,8 +14,6 @@ from .base_coder import Coder
|
|||
from .editblock_prompts import EditBlockPrompts
|
||||
|
||||
|
||||
import os
|
||||
|
||||
class EditBlockCoder(Coder):
|
||||
"""A coder that uses search/replace blocks for code modifications."""
|
||||
|
||||
|
@ -30,10 +29,11 @@ class EditBlockCoder(Coder):
|
|||
return edits
|
||||
|
||||
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
|
||||
|
||||
return pty.spawn(command)
|
||||
elif os.name == 'nt': # Windows
|
||||
elif os.name == "nt": # Windows
|
||||
return subprocess.run(command, shell=True)
|
||||
else:
|
||||
raise OSError("Unsupported operating system")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue