mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-03-31 13:35:08 -05:00
88 lines
4.9 KiB
TOML
88 lines
4.9 KiB
TOML
fix = true
|
|
line-length = 88
|
|
respect-gitignore = true
|
|
src = ["src"]
|
|
target-version = "py310"
|
|
output-format = "grouped"
|
|
show-fixes = true
|
|
|
|
# https://docs.astral.sh/ruff/settings/
|
|
# https://docs.astral.sh/ruff/rules/
|
|
[lint]
|
|
extend-select = [
|
|
"W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
|
|
"I", # https://docs.astral.sh/ruff/rules/#isort-i
|
|
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
|
|
"COM", # https://docs.astral.sh/ruff/rules/#flake8-commas-com
|
|
"DJ", # https://docs.astral.sh/ruff/rules/#flake8-django-dj
|
|
"EXE", # https://docs.astral.sh/ruff/rules/#flake8-executable-exe
|
|
"ISC", # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
|
|
"ICN", # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
|
|
"G201", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
|
|
"INP", # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
|
|
"PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
|
|
"Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
|
|
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
|
|
"T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
|
|
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
|
|
"TID", # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
|
|
"TCH", # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
|
|
"PLC", # https://docs.astral.sh/ruff/rules/#pylint-pl
|
|
"PLE", # https://docs.astral.sh/ruff/rules/#pylint-pl
|
|
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
|
|
"FLY", # https://docs.astral.sh/ruff/rules/#flynt-fly
|
|
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
|
|
"FBT", # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
|
|
]
|
|
ignore = ["DJ001", "SIM105", "RUF012"]
|
|
|
|
[lint.per-file-ignores]
|
|
".github/scripts/*.py" = ["E501", "INP001", "SIM117"]
|
|
"docker/wait-for-redis.py" = ["INP001", "T201"]
|
|
"src/documents/file_handling.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/management/commands/document_consumer.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/management/commands/document_exporter.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/migrations/0012_auto_20160305_0040.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/migrations/0014_document_checksum.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/migrations/1003_mime_types.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/migrations/1012_fix_archive_files.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/models.py" = ["SIM115", "PTH"] # TODO PTH Enable & remove
|
|
"src/documents/parsers.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/signals/handlers.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tasks.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_api_app_config.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_classifier.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_consumer.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_file_handling.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_management.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_management_consumer.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_management_exporter.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_management_thumbnails.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_migration_archive_files.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_migration_document_pages_count.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_migration_mime_type.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_sanity_check.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_tasks.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/tests/test_views.py" = ["PTH"] # TODO Enable & remove
|
|
"src/documents/views.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless/checks.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless/settings.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless/tests/test_checks.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless/urls.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless/views.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless_mail/mail.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless_mail/preprocessor.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless_tesseract/parsers.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless_tesseract/tests/test_parser.py" = ["RUF001", "PTH"] # TODO PTH Enable & remove
|
|
"src/paperless_tika/tests/test_live_tika.py" = ["PTH"] # TODO Enable & remove
|
|
"src/paperless_tika/tests/test_tika_parser.py" = ["PTH"] # TODO Enable & remove
|
|
# Testing
|
|
"*/tests/*.py" = ["E501", "SIM117"]
|
|
# Migrations
|
|
"*/migrations/*.py" = ["E501", "SIM", "T201"]
|
|
# Docker specific
|
|
"docker/rootfs/usr/local/bin/wait-for-redis.py" = ["INP001", "T201"]
|
|
|
|
[lint.isort]
|
|
force-single-line = true
|