Skip to content

Commit 54fb684

Browse files
committed
ensure it exists
1 parent 376ca0d commit 54fb684

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/cli_cmds/cmd_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def get_valid_subdirs(current_dir: Optional[Path] = None) -> list[str]:
264264
]
265265

266266

267-
def get_suggestions(section: str) -> tuple(list[str], Optional[str]):
267+
def get_suggestions(section: str) -> tuple[list[str], Optional[str]]:
268268
valid_subdirs = get_valid_subdirs()
269269
if section == CommonSections.module_root:
270270
return [d for d in valid_subdirs if d != "tests"], None
@@ -391,7 +391,7 @@ def collect_setup_info() -> CLISetupInfo:
391391
tests_root_answer = tests_answers["tests_root"]
392392

393393
if tests_root_answer == create_for_me_option:
394-
tests_root = Path(curdir) / default_tests_subdir
394+
tests_root = Path(curdir) / (default_tests_subdir or "tests")
395395
tests_root.mkdir()
396396
click.echo(f"✅ Created directory {tests_root}{os.path.sep}{LF}")
397397
elif tests_root_answer == custom_dir_option:

0 commit comments

Comments
 (0)