@@ -31,7 +31,7 @@ def find_pyproject_toml(config_file: Path | None = None) -> Path:
3131 raise ValueError (msg )
3232
3333
34- def parse_config_file (config_file_path : Path | None = None ) -> tuple [dict [str , Any ], Path ]:
34+ def parse_config_file (config_file_path : Path | None = None , override_formatter_check : bool = False ) -> tuple [dict [str , Any ], Path ]:
3535 config_file_path = find_pyproject_toml (config_file_path )
3636 try :
3737 with config_file_path .open ("rb" ) as f :
@@ -85,10 +85,12 @@ def parse_config_file(config_file_path: Path | None = None) -> tuple[dict[str, A
8585 "In pyproject.toml, Codeflash only supports the 'test-framework' as pytest and unittest."
8686 )
8787 if len (config ["formatter-cmds" ]) > 0 :
88- assert config ["formatter-cmds" ][0 ] != "your-formatter $file" , (
89- "The formatter command is not set correctly in pyproject.toml. Please set the "
90- "formatter command in the 'formatter-cmds' key. More info - https://docs.codeflash.ai/configuration"
91- )
88+ #see if this is happening during Github actions setup
89+ if not override_formatter_check :
90+ assert config ["formatter-cmds" ][0 ] != "your-formatter $file" , (
91+ "The formatter command is not set correctly in pyproject.toml. Please set the "
92+ "formatter command in the 'formatter-cmds' key. More info - https://docs.codeflash.ai/configuration"
93+ )
9294 for key in list (config .keys ()):
9395 if "-" in key :
9496 config [key .replace ("-" , "_" )] = config [key ]
0 commit comments