From 65b6db7b63a5fc85df8d6e21b629efa10db894db Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:11:50 -0700 Subject: [PATCH] Chore: enable flake8-logging-format G101/G202 ruff rules G202 (redundant exc_info=True passed to logger.exception, which already includes the traceback) had 2 hits in documents/views.py, fixed manually since ruff has no autofix for it. G101 (hardcoded password string) had zero hits. --- pyproject.toml | 2 ++ src/documents/views.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6c5f1a9fe..b3584b61d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -197,7 +197,9 @@ extend-select = [ "FLY", # https://docs.astral.sh/ruff/rules/#flynt-fly "FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb "G010", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g + "G101", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g "G201", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g + "G202", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g "I", # https://docs.astral.sh/ruff/rules/#isort-i "ICN", # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn "INP", # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp diff --git a/src/documents/views.py b/src/documents/views.py index f03aea7e2..18f11522e 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -1570,7 +1570,6 @@ class DocumentViewSet( "document %s: %s", doc.pk, exc, - exc_info=True, ) raise ValidationError( {"ai": [_("Invalid AI configuration.")]}, @@ -1581,7 +1580,6 @@ class DocumentViewSet( "document %s: %s", doc.pk, exc, - exc_info=True, ) return Response( {"ai": [_("AI backend request timed out.")]},