File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 88from pathlib import Path
99from typing import TYPE_CHECKING , Any , Optional
1010
11- import click
11+ from rich . prompt import Confirm
1212
1313if TYPE_CHECKING :
1414 import argparse
@@ -137,7 +137,7 @@ def ask_should_use_checkpoint_get_functions(args: argparse.Namespace) -> Optiona
137137 previous_checkpoint_functions = None
138138 if args .all and (sys .platform == "linux" or sys .platform == "darwin" ) and Path ("/tmp" ).is_dir (): # noqa: S108 #TODO: use the temp dir from codeutils-compat.py
139139 previous_checkpoint_functions = get_all_historical_functions (args .module_root , Path ("/tmp" )) # noqa: S108
140- if previous_checkpoint_functions and click . confirm (
140+ if previous_checkpoint_functions and Confirm . ask (
141141 "Previous Checkpoint detected from an incomplete optimization run, shall I continue the optimization from that point?" ,
142142 default = True ,
143143 ):
Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ def run(self) -> None:
162162
163163 console .rule ()
164164 start_time = time .time ()
165- function_to_tests : dict [str , list [FunctionCalledInTest ]] = discover_unit_tests ( self . test_cfg )
166- num_discovered_tests : int = sum ([ len ( value ) for value in function_to_tests . values ()] )
165+ function_to_tests : dict [str , list [FunctionCalledInTest ]]
166+ function_to_tests , num_discovered_tests = discover_unit_tests ( self . test_cfg )
167167 console .rule ()
168168 logger .info (
169169 f"Discovered { num_discovered_tests } existing unit tests in { (time .time () - start_time ):.1f} s at { self .test_cfg .tests_root } "
You can’t perform that action at this time.
0 commit comments