Skip to content

Commit ecac80d

Browse files
saga4saga4
authored andcommitted
fix
1 parent 5a8f464 commit ecac80d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codeflash/code_utils/formatter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ def format_code(
144144

145145
max_diff_lines = min(int(original_code_lines * 0.3), 50)
146146

147-
if diff_lines_count > max_diff_lines and max_diff_lines != -1:
147+
if diff_lines_count > max_diff_lines:
148148
logger.debug(
149149
f"Skipping formatting {path}: {diff_lines_count} lines would change (max: {max_diff_lines})"
150150
)
151+
return original_code
151152
except FileNotFoundError as e:
152153
logger.warning(f"Formatter not found, skipping diff check: {e}")
153154
# Continue without formatting checks

0 commit comments

Comments
 (0)