Skip to content

Commit 16ce6ff

Browse files
committed
formatter
1 parent 278822b commit 16ce6ff

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

codeflash/cli_cmds/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ def parse_args() -> Namespace:
9797
parser.add_argument("--no-draft", default=False, action="store_true", help="Skip optimization for draft PRs")
9898
parser.add_argument("--worktree", default=False, action="store_true", help="Use worktree for optimization")
9999
parser.add_argument(
100-
"--async", default=False, action="store_true", help="Enable optimization of async functions. By default, async functions are excluded from optimization."
100+
"--async",
101+
default=False,
102+
action="store_true",
103+
help="Enable optimization of async functions. By default, async functions are excluded from optimization.",
101104
)
102105

103106
args, unknown_args = parser.parse_known_args()

codeflash/discovery/functions_to_optimize.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def get_functions_to_optimize(
179179
project_root: Path,
180180
module_root: Path,
181181
previous_checkpoint_functions: dict[str, dict[str, str]] | None = None,
182+
*,
182183
enable_async: bool = False,
183184
) -> tuple[dict[Path, list[FunctionToOptimize]], int, Path | None]:
184185
assert sum([bool(optimize_all), bool(replay_test), bool(file)]) <= 1, (
@@ -233,7 +234,13 @@ def get_functions_to_optimize(
233234
ph("cli-optimizing-git-diff")
234235
functions = get_functions_within_git_diff(uncommitted_changes=False)
235236
filtered_modified_functions, functions_count = filter_functions(
236-
functions, test_cfg.tests_root, ignore_paths, project_root, module_root, previous_checkpoint_functions, enable_async=enable_async
237+
functions,
238+
test_cfg.tests_root,
239+
ignore_paths,
240+
project_root,
241+
module_root,
242+
previous_checkpoint_functions,
243+
enable_async=enable_async,
237244
)
238245

239246
logger.info(f"!lsp|Found {functions_count} function{'s' if functions_count > 1 else ''} to optimize")
@@ -568,7 +575,8 @@ def filter_functions(
568575
project_root: Path,
569576
module_root: Path,
570577
previous_checkpoint_functions: dict[Path, dict[str, Any]] | None = None,
571-
disable_logs: bool = False, # noqa: FBT001, FBT002
578+
*,
579+
disable_logs: bool = False,
572580
enable_async: bool = False,
573581
) -> tuple[dict[Path, list[FunctionToOptimize]], int]:
574582
filtered_modified_functions: dict[str, list[FunctionToOptimize]] = {}

0 commit comments

Comments
 (0)