Skip to content

Commit bbf852d

Browse files
committed
revert to bool arg
1 parent d74c920 commit bbf852d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

codeflash/cli_cmds/cmd_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def configure_pyproject_toml(setup_info: SetupInfo) -> None:
721721
)
722722
elif formatter == "don't use a formatter":
723723
formatter_cmds.append("disabled")
724-
check_formatter_installed(formatter_cmds, exit_on_failure="no")
724+
check_formatter_installed(formatter_cmds, exit_on_failure=False)
725725
codeflash_section["formatter-cmds"] = formatter_cmds
726726
# Add the 'codeflash' section, ensuring 'tool' section exists
727727
tool_section = pyproject_data.get("tool", tomlkit.table())

codeflash/code_utils/env_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from codeflash.code_utils.shell_utils import read_api_key_from_shell_config
1313

1414

15-
def check_formatter_installed(formatter_cmds: list[str], exit_on_failure: str = "yes") -> bool:
15+
def check_formatter_installed(formatter_cmds: list[str], exit_on_failure: bool = True) -> bool: # noqa
1616
return_code = True
1717
if formatter_cmds[0] == "disabled":
1818
return return_code
@@ -27,7 +27,7 @@ def check_formatter_installed(formatter_cmds: list[str], exit_on_failure: str =
2727
print(
2828
"⚠️ Codeflash requires a code formatter to be installed in your environment, but none was found. Please install a supported formatter, verify the formatter-cmds in your codeflash pyproject.toml config and try again."
2929
)
30-
if exit_on_failure == "yes":
30+
if exit_on_failure:
3131
sys.exit(1)
3232
return return_code
3333

0 commit comments

Comments
 (0)