-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
79 lines (68 loc) · 1.67 KB
/
pyproject.toml
File metadata and controls
79 lines (68 loc) · 1.67 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
70
71
72
73
74
75
76
77
78
79
# Ruff linting
[tool.ruff]
line-length = 145
target-version = "py39"
[tool.ruff.lint]
select = [ # Auto-fixable rules only
"I", # isort
"UP", # pyupgrade
"F401", # unused imports
"RUF" # ruff rules
]
ignore = [
"RUF012", # Not auto-fixable (remove eventually)
"RUF001" # Not auto-fixable (remove eventually)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "UP035"] # __init__.py file exceptions
# Keep complexity below 28
[tool.ruff.lint.mccabe]
max-complexity = 28
[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# HTML linting
[tool.djlint]
profile = "django"
extension = "html"
indent = 2
# Auto-fixable rules only
include = "H008,H009,H010,H014,H024,H026,H033,T028,T034"
# Ignore troublesome rules that aren't auto-fixable or causing issues
ignore = "D004,D018,H005,H006,H007,H011,H012,H013,H015,H016,H017,H019,H020,H021,H022,H023,H025,H029,H030,H031,H035,H036,H037,J004,J018,T001,T002,T003,T027,T032"
# Markdown linting
[tool.mdformat]
wrap = true
number = true
# Semgrep configuration
[tool.semgrep]
config = [
"p/python", # Built-in Python rules
"semgrep", # Look for our other rules
"r/typescript.react.security.audit.react-dangerouslysetinnerhtml.react-dangerouslysetinnerhtml" # TypeScript React security rule
]
ignore-patterns = [
"node_modules/",
"build/",
"dist/",
"vendor/",
"env/",
".env/",
"venv/",
".venv/",
".tox/",
"*.min.js",
"test/",
"tests/",
"*_test.go",
".semgrep",
"wheels/",
".html",
"*.md",
"*.svg"
]