Skip to content

Commit d9666fd

Browse files
author
Your Name
committed
cli-29: fixin ghanging and async exception raise
1 parent 5548210 commit d9666fd

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

cecli/coders/base_coder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
from cecli.repo import ANY_GIT_ERROR, GitRepo
6262
from cecli.repomap import RepoMap
6363
from cecli.report import update_error_prefix
64-
from cecli.run_cmd import run_cmd, run_cmd_async
64+
from cecli.run_cmd import run_cmd_async
6565
from cecli.sessions import SessionManager
6666
from cecli.tools.utils.output import print_tool_response
6767
from cecli.tools.utils.registry import ToolRegistry

cecli/commands/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
from typing import List
32

43
import cecli.prompts.utils.system as prompts

cecli/linter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import asyncio
22
import os
33
import re
4-
import subprocess
54
import sys
65
import traceback
76
import warnings
@@ -11,7 +10,6 @@
1110
import oslex
1211

1312
from cecli.dump import dump # noqa: F401
14-
from cecli.helpers.coroutines import interruptible
1513
from cecli.helpers.grep_ast import TreeContext, filename_to_lang
1614
from cecli.helpers.grep_ast.tsl import get_parser # noqa: E402
1715
from cecli.run_cmd import run_cmd_async, run_cmd_subprocess # noqa: F401

cecli/models.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,9 +1279,7 @@ async def send_completion(
12791279
if override_kwargs:
12801280
kwargs = deep_merge(kwargs, override_kwargs)
12811281
completion_coro = litellm.acompletion(**kwargs)
1282-
res, interrupted = await coroutines.interruptible(
1283-
completion_coro, interrupt_event
1284-
)
1282+
res, interrupted = await coroutines.interruptible(completion_coro, interrupt_event)
12851283
if interrupted:
12861284
raise KeyboardInterrupt("Interrupted during acompletion")
12871285

cecli/run_cmd.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ def run_cmd_subprocess(
9999

100100

101101
async def run_cmd_async(
102-
command, interrupt_event, verbose=False, cwd=None, encoding=sys.stdout.encoding, should_print=True
102+
command,
103+
interrupt_event,
104+
verbose=False,
105+
cwd=None,
106+
encoding=sys.stdout.encoding,
107+
should_print=True,
103108
):
104109
if verbose:
105110
print("Using run_cmd_async:", command)

0 commit comments

Comments
 (0)