-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
65 lines (54 loc) · 1.46 KB
/
ruff.toml
File metadata and controls
65 lines (54 loc) · 1.46 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
63
64
# Ruff configuration for django-forms-workflows
# https://docs.astral.sh/ruff/
# Exclude common directories
exclude = [
".git",
".venv",
"venv",
"__pycache__",
"*.egg-info",
"build",
"dist",
"migrations",
]
# Set line length to match Black's default
line-length = 88
# Target Python 3.10+
target-version = "py310"
[lint]
# Enable recommended rules
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DJ", # flake8-django
]
# Ignore specific rules
ignore = [
"E501", # line too long (handled by formatter)
"DJ001", # Django model without __str__ (not always needed)
"DJ012", # Django model field/method ordering (too strict for existing code)
]
[lint.per-file-ignores]
# Allow unused imports in __init__.py files
"__init__.py" = ["F401"]
# Allow star imports in settings
"settings.py" = ["F403", "F405"]
# Allow User variable name in LDAP backend (Django convention)
"ldap_backend.py" = ["N806"]
[lint.isort]
# Django-specific isort settings
known-first-party = ["django_forms_workflows"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
[format]
# Use double quotes for strings
quote-style = "double"
# Indent with spaces
indent-style = "space"
# Respect magic trailing comma
skip-magic-trailing-comma = false