mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
50 lines
1.3 KiB
TOML
50 lines
1.3 KiB
TOML
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
extend-exclude = ["migrations", "venv", ".venv"]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"UP", # pyupgrade
|
|
"C4", # flake8-comprehensions
|
|
"DJ", # flake8-django
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (formatter handles it)
|
|
"B008", # function call in default argument (common in DRF)
|
|
"DJ001", # null=True on string fields (pre-existing schema decisions)
|
|
"DJ008", # missing __str__ (not all models need one)
|
|
"DJ012", # model attribute ordering style
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"api/migrations/*.py" = ["ALL"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
plugins = ["mypy_django_plugin.main", "mypy_drf_plugin.main"]
|
|
exclude = ["migrations/", "venv/", ".venv/"]
|
|
disallow_untyped_defs = false
|
|
check_untyped_defs = true
|
|
warn_unused_ignores = true
|
|
warn_redundant_casts = true
|
|
ignore_missing_imports = true
|
|
|
|
[tool.django-stubs]
|
|
django_settings_module = "holy_backend.settings.dev"
|
|
|
|
[tool.pytest.ini_options]
|
|
DJANGO_SETTINGS_MODULE = "holy_backend.settings.dev"
|
|
python_files = ["test_*.py", "tests.py"]
|
|
testpaths = ["api/tests"]
|
|
addopts = "-ra --strict-markers"
|