Skip to content

Commit 9face63

Browse files
committed
"ruff check --fix"
1 parent b6baf05 commit 9face63

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

codeflash/code_utils/formatter.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,14 @@ def get_modification_code_ranges(
6666
preexisting_functions: set[tuple[str, tuple[FunctionParent,...]]],
6767
helper_functions: list[FunctionSource],
6868
) -> list[tuple[int, int]]:
69-
"""
70-
Returns the starting and ending line numbers of modified and new functions in a file containing edits.
69+
"""Returns the starting and ending line numbers of modified and new functions in a file containing edits.
7170
"""
7271
modified_functions = set()
7372
modified_functions.add(fto.qualified_name)
7473
for helper_function in helper_functions:
7574
if helper_function.jedi_definition.type != "class":
7675
modified_functions.add(helper_function.qualified_name)
77-
76+
7877
parsed_function_names = set()
7978
for original_function_name in modified_functions:
8079
if original_function_name.count(".") == 0:

codeflash/optimization/function_optimizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import uuid
99
from collections import defaultdict, deque
1010
from pathlib import Path
11-
from typing import Optional, TYPE_CHECKING
11+
from typing import TYPE_CHECKING
1212

1313
import isort
1414
import libcst as cst
@@ -607,7 +607,7 @@ def reformat_code_and_helpers(
607607
should_sort_imports = not self.args.disable_imports_sorting
608608
if should_sort_imports and isort.code(original_code) != original_code:
609609
should_sort_imports = False
610-
610+
611611
paths = [fto_path] + list({hf.file_path for hf in helper_functions})
612612
new_target_code = None
613613
new_helper_code: dict[Path, str] = {}
@@ -646,7 +646,7 @@ def reformat_code_and_helpers(
646646

647647
if should_sort_imports:
648648
new_code = sort_imports(new_code)
649-
649+
650650
if i == 0:
651651
new_target_code = new_code
652652
else:

0 commit comments

Comments
 (0)