From 0006d70a7c02aba0f078b0105e466c88466e2292 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 20 Aug 2024 19:25:13 -0700 Subject: [PATCH] style: Fix import order and formatting in editblock_coder.py --- aider/coders/editblock_coder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/coders/editblock_coder.py b/aider/coders/editblock_coder.py index a6667f6c7..f96c29ad1 100644 --- a/aider/coders/editblock_coder.py +++ b/aider/coders/editblock_coder.py @@ -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")