Skip to content

Commit 6f01812

Browse files
committed
CM-65133 ignore ruff rule
1 parent 7dd8611 commit 6f01812

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

cycode/cli/apps/mcp/mcp_command.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def _get_current_executable() -> str:
6565

6666
return 'cycode'
6767

68-
69-
async def _run_cycode_command(*args: str) -> dict[str, Any]:
68+
# ruff: disable[ASYNC109]
69+
async def _run_cycode_command(*args: str, timeout: int = _DEFAULT_RUN_COMMAND_TIMEOUT) -> dict[str, Any]:
7070
"""Run a cycode command asynchronously and return the parsed result.
7171
7272
Args:
@@ -79,7 +79,6 @@ async def _run_cycode_command(*args: str) -> dict[str, Any]:
7979
verbose = ['-v'] if _is_debug_mode() else []
8080
cmd_args = [_get_current_executable(), *verbose, '-o', 'json', *list(args)]
8181
_logger.debug('Running Cycode CLI command: %s', ' '.join(cmd_args))
82-
timeout = _DEFAULT_RUN_COMMAND_TIMEOUT
8382

8483
try:
8584
process = await asyncio.create_subprocess_exec(
@@ -109,7 +108,7 @@ async def _run_cycode_command(*args: str) -> dict[str, Any]:
109108
return {'error': f'Command timeout after {timeout} seconds'}
110109
except Exception as e:
111110
return {'error': f'Failed to run command: {e!s}'}
112-
111+
# ruff: enable[ASYNC109]
113112

114113
def _sanitize_file_path(file_path: str) -> str:
115114
"""Sanitize file path to prevent path traversal and other security issues.

0 commit comments

Comments
 (0)