From 3e3b0aa6e3d7d0b7c1c0b768f132c7727c3dae95 Mon Sep 17 00:00:00 2001 From: mrveiss Date: Mon, 30 Mar 2026 16:48:20 +0300 Subject: [PATCH] fix(backend): document bare-except regex false positive on string literals (#2911) The QUA001 pattern matches inside multi-line strings (test fixtures), producing false positives. Added note to description field. Co-Authored-By: Claude Opus 4.6 (1M context) --- autobot-backend/api/analytics_precommit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autobot-backend/api/analytics_precommit.py b/autobot-backend/api/analytics_precommit.py index 0c6443c71..4d336e863 100644 --- a/autobot-backend/api/analytics_precommit.py +++ b/autobot-backend/api/analytics_precommit.py @@ -214,7 +214,7 @@ class HookStatus(BaseModel): category=CheckCategory.QUALITY, severity=CheckSeverity.WARN, pattern=r"except\s*(?:\w+\s*)?:\s*(?:pass|\.\.\.)\s*$", - description="Empty exception handler found", + description="Empty exception handler found (note: may match inside multi-line strings #2911)", suggestion="Add proper error handling or logging", file_patterns=["*.py"], ),