From 47105357a0e201aa859a7b52efa7d101a116da81 Mon Sep 17 00:00:00 2001 From: libraz Date: Sat, 31 May 2025 19:02:42 +0900 Subject: [PATCH] Fix unused global lint errors --- src/bpm_detector/cli.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bpm_detector/cli.py b/src/bpm_detector/cli.py index 0cb44a9..2f5e480 100644 --- a/src/bpm_detector/cli.py +++ b/src/bpm_detector/cli.py @@ -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}") @@ -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") @@ -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")