@@ -68,7 +68,6 @@ def init_codeflash() -> None:
6868 did_add_new_key = prompt_api_key ()
6969
7070 if should_modify_pyproject_toml ():
71-
7271 setup_info : SetupInfo = collect_setup_info ()
7372
7473 configure_pyproject_toml (setup_info )
@@ -81,7 +80,6 @@ def init_codeflash() -> None:
8180 if "setup_info" in locals ():
8281 module_string = f" you selected ({ setup_info .module_root } )"
8382
84-
8583 click .echo (
8684 f"{ LF } "
8785 f"⚡️ Codeflash is now set up! You can now run:{ LF } "
@@ -123,18 +121,19 @@ def ask_run_end_to_end_test(args: Namespace) -> None:
123121 bubble_sort_path , bubble_sort_test_path = create_bubble_sort_file_and_test (args )
124122 run_end_to_end_test (args , bubble_sort_path , bubble_sort_test_path )
125123
124+
126125def should_modify_pyproject_toml () -> bool :
127- """
128- Check if the current directory contains a valid pyproject.toml file with codeflash config
126+ """Check if the current directory contains a valid pyproject.toml file with codeflash config
129127 If it does, ask the user if they want to re-configure it.
130128 """
131129 from rich .prompt import Confirm
130+
132131 pyproject_toml_path = Path .cwd () / "pyproject.toml"
133132 if not pyproject_toml_path .exists ():
134133 return True
135134 try :
136135 config , config_file_path = parse_config_file (pyproject_toml_path )
137- except Exception as e :
136+ except Exception :
138137 return True
139138
140139 if "module_root" not in config or config ["module_root" ] is None or not Path (config ["module_root" ]).is_dir ():
@@ -143,7 +142,9 @@ def should_modify_pyproject_toml() -> bool:
143142 return True
144143
145144 create_toml = Confirm .ask (
146- f"✅ A valid Codeflash config already exists in this project. Do you want to re-configure it?" , default = False , show_default = True
145+ "✅ A valid Codeflash config already exists in this project. Do you want to re-configure it?" ,
146+ default = False ,
147+ show_default = True ,
147148 )
148149 return create_toml
149150
@@ -224,7 +225,7 @@ def collect_setup_info() -> SetupInfo:
224225 else :
225226 apologize_and_exit ()
226227 else :
227- tests_root = Path (curdir ) / Path (cast (str , tests_root_answer ))
228+ tests_root = Path (curdir ) / Path (cast (" str" , tests_root_answer ))
228229 tests_root = tests_root .relative_to (curdir )
229230 ph ("cli-tests-root-provided" )
230231
@@ -278,9 +279,9 @@ def collect_setup_info() -> SetupInfo:
278279 return SetupInfo (
279280 module_root = str (module_root ),
280281 tests_root = str (tests_root ),
281- test_framework = cast (str , test_framework ),
282+ test_framework = cast (" str" , test_framework ),
282283 ignore_paths = ignore_paths ,
283- formatter = cast (str , formatter ),
284+ formatter = cast (" str" , formatter ),
284285 git_remote = str (git_remote ),
285286 )
286287
@@ -390,7 +391,7 @@ def check_for_toml_or_setup_file() -> str | None:
390391 click .echo ("⏩️ Skipping pyproject.toml creation." )
391392 apologize_and_exit ()
392393 click .echo ()
393- return cast (str , project_name )
394+ return cast (" str" , project_name )
394395
395396
396397def install_github_actions (override_formatter_check : bool = False ) -> None :
0 commit comments