mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-29 05:57:32 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.")]},
|
||||
|
||||
Reference in New Issue
Block a user