From f4f7505e5c2b93f749b32df2d74d8b87cf9027cd Mon Sep 17 00:00:00 2001 From: "Bobby (aider)" Date: Wed, 12 Feb 2025 20:02:00 -0800 Subject: [PATCH] refactor: Update report filtering logic to match specific scanner naming patterns --- src/utils/report_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/utils/report_utils.py b/src/utils/report_utils.py index 820a7f9..20e05a5 100644 --- a/src/utils/report_utils.py +++ b/src/utils/report_utils.py @@ -23,9 +23,12 @@ def load_scanner_reports(scanner_type: str = None): # Get file creation time created = datetime.fromtimestamp(file.stat().st_ctime) - # If scanner_type is specified, only include matching reports - if scanner_type: - if not file.name.lower().startswith(scanner_type.lower()): + # If scanner_type is specified, filter based on actual naming patterns + if scanner_type == "technical": + if not (file.name.startswith(("atr_ema_", "sunny_"))): + continue + elif scanner_type == "canslim": + if not file.name.startswith("canslim_"): continue reports.append({