From d7bab250cd1e7a84fef84e493d828053822d1562 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 04:19:17 +0000 Subject: [PATCH 1/2] chore(lint): enable PERF203 rule (no try-except in loops) Un-ignore PERF203 which flags try/except blocks inside for/while loops. Moving exception handling outside loops improves performance and aligns with the org's guard-statement-over-try-except standard. 70 existing violations need compliance fixes. Co-Authored-By: AJ Steers --- .ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruff.toml b/.ruff.toml index f0b61926a..59f577f28 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -75,7 +75,7 @@ ignore = [ "ISC001", # Conflicts with ruff auto-format "NPY", # NumPy-specific rules "PIE790", # Allow unnecssary 'pass' (sometimes useful for readability) - "PERF203", # exception handling in loop + # "PERF203", # exception handling in loop (now enforced) "PLR6301", # Allow class methods that don't use 'self' (otherwise noisy) "RUF022", # Allow unsorted __all__ (sometimes useful for grouping by type with pdoc) "S", # flake8-bandit (noisy, security related) From 776f3d2d49c93b2e105b45b3efdfcecc1193da60 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 04:22:28 +0000 Subject: [PATCH 2/2] fix(lint): remove PERF203 from ignore list (already selected via PERF) Per review feedback: remove from ignore entirely instead of commenting out. PERF203 is already selected via the PERF category. Co-Authored-By: AJ Steers --- .ruff.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ruff.toml b/.ruff.toml index 59f577f28..899929db3 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -75,7 +75,6 @@ ignore = [ "ISC001", # Conflicts with ruff auto-format "NPY", # NumPy-specific rules "PIE790", # Allow unnecssary 'pass' (sometimes useful for readability) - # "PERF203", # exception handling in loop (now enforced) "PLR6301", # Allow class methods that don't use 'self' (otherwise noisy) "RUF022", # Allow unsorted __all__ (sometimes useful for grouping by type with pdoc) "S", # flake8-bandit (noisy, security related)