-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
62 lines (53 loc) · 1.66 KB
/
pyproject.toml
File metadata and controls
62 lines (53 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[tool.ruff]
# Target Python version
target-version = "py311"
# Line length
line-length = 120
# Exclude directories
exclude = [
".git",
".venv",
"__pycache__",
"migrations",
"node_modules",
"dist",
"build",
]
[tool.ruff.lint]
# Enable pycodestyle (E), pyflakes (F), isort (I), and more
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"DJ", # flake8-django
]
# Ignore specific rules
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults (needed for Django)
"B904", # Within an except clause, raise exceptions with raise ... from err
"DJ001", # Avoid null=True on string fields - existing codebase pattern
"DJ012", # Model ordering style - keep existing code style
"DJ007", # Do not use __all__ with ModelForm - keep existing pattern
"F403", # Star imports - used in Django settings (from .base import *)
"F405", # Names from star imports - used in Django settings
]
[tool.ruff.lint.per-file-ignores]
# Allow unused imports in __init__.py for Django admin autodiscovery
"__init__.py" = ["F401"]
# Allow unused variables in tests (test fixtures)
"test_*.py" = ["F841"]
"tests.py" = ["F841"]
[tool.ruff.lint.isort]
known-first-party = ["core", "authn", "cms", "event", "news", "projects", "mail", "sheets", "sponsors"]
[tool.ruff.format]
# Use double quotes
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Unix-style line endings
line-ending = "lf"