File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,16 @@ def configure_pyproject_toml(setup_info: SetupInfo) -> None:
587587 )
588588 elif formatter == "don't use a formatter" :
589589 formatter_cmds .append ("disabled" )
590+ if formatter in ["black" , "ruff" ]:
591+ try :
592+ result = subprocess .run ([formatter ], capture_output = True , check = False )
593+ click .echo (f"✅ Formatter exists on system" )
594+ click .echo ()
595+ except FileNotFoundError as e :
596+ click .echo (f"⚠️ Formatter not found: { formatter } " )
597+ click .echo ()
598+ # Not throwing an exception, letting the program proceed even though the formatter was not found, putting it on the user to install it later
599+ # raise e from None
590600 codeflash_section ["formatter-cmds" ] = formatter_cmds
591601 # Add the 'codeflash' section, ensuring 'tool' section exists
592602 tool_section = pyproject_data .get ("tool" , tomlkit .table ())
You can’t perform that action at this time.
0 commit comments