mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-09-02 16:07:15 +00:00
Enables more rules for migration dirs
This commit is contained in:
+2
-5
@@ -268,6 +268,7 @@ extend-select = [
|
||||
"S102", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
|
||||
"S110",
|
||||
"S112",
|
||||
"S113",
|
||||
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
|
||||
"T100", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
|
||||
"T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
|
||||
@@ -290,11 +291,7 @@ ignore = [
|
||||
"G004", # Logging statement uses f-string - good to do, but a large diff
|
||||
]
|
||||
# Migrations
|
||||
per-file-ignores."*/migrations/*.py" = [
|
||||
"E501",
|
||||
"SIM",
|
||||
"T201",
|
||||
]
|
||||
per-file-ignores."*/migrations/*.py" = []
|
||||
# Testing
|
||||
per-file-ignores."*/tests/*.py" = [
|
||||
"DTZ",
|
||||
|
||||
@@ -75,7 +75,7 @@ def recompute_checksums(apps, schema_editor):
|
||||
if updated_fields:
|
||||
batch.append(doc)
|
||||
|
||||
processed += 1
|
||||
processed += 1 # noqa: SIM113
|
||||
|
||||
if len(batch) >= _BATCH_SIZE:
|
||||
Document.objects.bulk_update(batch, ["checksum", "archive_checksum"])
|
||||
|
||||
Reference in New Issue
Block a user