Skip to content

Commit 290f7b3

Browse files
committed
circular depenencies
1 parent 72519d5 commit 290f7b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

codeflash/code_utils/env_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
import os
2+
import subprocess
23
from functools import lru_cache
34
from typing import Optional
5+
46
from codeflash.cli_cmds.console import logger
57
from codeflash.code_utils.shell_utils import read_api_key_from_shell_config
6-
from codeflash.verification.test_runner import execute_test_subprocess
78

89

910
def check_formatter_installed(formatter_cmds: list[str]) -> bool:
1011
cmd_parts = formatter_cmds[0].split(" ")
1112
if "black" in cmd_parts or "ruff" in cmd_parts:
1213
formatter = cmd_parts[0]
1314
try:
14-
execute_test_subprocess([formatter])
15+
subprocess.run([formatter], check=False)
1516
except (FileNotFoundError, NotADirectoryError):
1617
logger.error(f"⚠️ Formatter not found: {formatter}, please ensure it is installed")
1718
return False
1819
return True
1920

21+
2022
@lru_cache(maxsize=1)
2123
def get_codeflash_api_key() -> str:
2224
api_key = os.environ.get("CODEFLASH_API_KEY") or read_api_key_from_shell_config()

0 commit comments

Comments
 (0)