-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
69 lines (62 loc) · 1.69 KB
/
Copy pathpyproject.toml
File metadata and controls
69 lines (62 loc) · 1.69 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
65
66
67
68
69
[project]
name = "wagtail-shop-kit"
version = "0.1.0"
description = "Full Stack Wagtail Shop Kit"
authors = [{name = "nickmoreton", email = "nickmoreton@me.com"}]
license = "MIT"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"django~=5.2",
"django-browser-reload~=1.21",
"wagtail~=7.2",
]
[dependency-groups]
dev = [
"coverage",
"django-upgrade",
"pre-commit",
"pyupgrade",
"ruff",
]
[tool.ruff]
# Same as Black's default
line-length = 88
target-version = "py310"
# Enable rule sets equivalent to flake8, isort, and additional useful rules
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade (already using pyupgrade in pre-commit)
"B", # flake8-bugbear (common bugs)
"C4", # flake8-comprehensions
"DJ", # flake8-django
"SIM", # flake8-simplify
]
# Ignore rules that conflict with Django or are too strict for this project
lint.ignore = [
"E501", # Line too long (handled by formatter)
"DJ001", # Avoid nullable CharField/TextField (common pattern in Django)
"N812", # Lowercase imported as non-lowercase (common pattern for version constants)
"SIM105", # Use contextlib.suppress instead of try-except-pass (try-except is clearer)
]
# Exclude patterns
exclude = [
".git",
".venv",
"__pycache__",
"*/migrations/*",
"node_modules",
"static_compiled",
]
[tool.ruff.lint.isort]
# Black-compatible import sorting
known-first-party = ["app"]
[tool.ruff.format]
# Use Black-compatible formatting
quote-style = "double"
indent-style = "space"
line-ending = "auto"