Skip to content

Commit d3ca1cb

Browse files
remove unnecessary check
1 parent 1522227 commit d3ca1cb

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

codeflash/code_utils/formatter.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ def should_format_file(filepath, max_lines_changed=50):
2323
capture_output=True,
2424
text=True
2525
)
26-
27-
if result.returncode == 0 and not result.stdout:
28-
return False
2926

3027
diff_lines = [line for line in result.stdout.split('\n')
3128
if line.startswith(('+', '-')) and not line.startswith(('+++', '---'))]

tests/test_formatter.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from codeflash.discovery.functions_to_optimize import FunctionToOptimize
1313
from codeflash.optimization.function_optimizer import FunctionOptimizer
14-
from codeflash.optimization.function_optimizer import FunctionSource
1514
from codeflash.verification.verification_utils import TestConfig
1615

1716
def test_remove_duplicate_imports():
@@ -258,9 +257,7 @@ def _run_formatting_test(source_filename: str, should_content_change: bool):
258257
)
259258

260259
optimizer.reformat_code_and_helpers(
261-
helper_functions=[
262-
FunctionSource()
263-
],
260+
helper_functions=[],
264261
path=target_path,
265262
original_code=optimizer.function_to_optimize_source_code,
266263
)

0 commit comments

Comments
 (0)