Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/bpm_detector/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

def signal_handler(signum, frame):
"""Handle Ctrl+C gracefully."""
global interrupted, current_analyzer
global interrupted
interrupted = True

print(f"\n{Fore.YELLOW}⚠️ Interrupted by user. Cleaning up...{Style.RESET_ALL}")
Expand Down Expand Up @@ -277,9 +277,8 @@ def analyze_file_with_progress(path: str, analyzer, args: argparse.Namespace) ->
progress_display = None
if args.progress:
progress_display = create_progress_display(detailed=args.detailed_progress)

def smart_progress_callback(progress: float, message: str = ""):
global interrupted
if interrupted:
raise KeyboardInterrupt("Analysis interrupted by user")

Expand Down Expand Up @@ -441,7 +440,6 @@ def main() -> None:
if hasattr(analyzer, 'analyze_file') and hasattr(analyzer, '_parallel_config'):
try:
def multi_progress_callback(progress: float, message: str = ""):
global interrupted
if interrupted:
raise KeyboardInterrupt("Analysis interrupted by user")

Expand Down
Loading