Skip to content

Commit 309ec58

Browse files
authored
Merge pull request #234 from codeflash-ai/check-verify-setup
Adding type hints to the dummy code for `verify-setup` (CF-647)
2 parents 8ffb274 + a7c1e45 commit 309ec58

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

codeflash/cli_cmds/cmd_init.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def collect_setup_info() -> SetupInfo:
239239
else:
240240
apologize_and_exit()
241241
else:
242-
tests_root = Path(curdir) / Path(cast(str, tests_root_answer))
242+
tests_root = Path(curdir) / Path(cast("str", tests_root_answer))
243243
tests_root = tests_root.relative_to(curdir)
244244
ph("cli-tests-root-provided")
245245

@@ -302,7 +302,7 @@ def collect_setup_info() -> SetupInfo:
302302
elif benchmarks_answer == no_benchmarks_option:
303303
benchmarks_root = None
304304
else:
305-
benchmarks_root = tests_root / Path(cast(str, benchmarks_answer))
305+
benchmarks_root = tests_root / Path(cast("str", benchmarks_answer))
306306

307307
# TODO: Implement other benchmark framework options
308308
# if benchmarks_root:
@@ -354,9 +354,9 @@ def collect_setup_info() -> SetupInfo:
354354
module_root=str(module_root),
355355
tests_root=str(tests_root),
356356
benchmarks_root=str(benchmarks_root) if benchmarks_root else None,
357-
test_framework=cast(str, test_framework),
357+
test_framework=cast("str", test_framework),
358358
ignore_paths=ignore_paths,
359-
formatter=cast(str, formatter),
359+
formatter=cast("str", formatter),
360360
git_remote=str(git_remote),
361361
)
362362

@@ -466,7 +466,7 @@ def check_for_toml_or_setup_file() -> str | None:
466466
click.echo("⏩️ Skipping pyproject.toml creation.")
467467
apologize_and_exit()
468468
click.echo()
469-
return cast(str, project_name)
469+
return cast("str", project_name)
470470

471471

472472
def install_github_actions(override_formatter_check: bool = False) -> None:
@@ -852,7 +852,7 @@ def enter_api_key_and_save_to_rc() -> None:
852852

853853

854854
def create_bubble_sort_file_and_test(args: Namespace) -> tuple[str, str]:
855-
bubble_sort_content = """def sorter(arr):
855+
bubble_sort_content = """def sorter(arr: list[int] | list[float]) -> list[int] | list[float]:
856856
for i in range(len(arr)):
857857
for j in range(len(arr) - 1):
858858
if arr[j] > arr[j + 1]:

0 commit comments

Comments
 (0)