-
Notifications
You must be signed in to change notification settings - Fork 15
/
ruff.toml
45 lines (36 loc) · 1001 Bytes
/
ruff.toml
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
extend-exclude = [
"LC_MESSAGES",
"locale",
]
line-length = 88
[lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DJ", # flake8-django
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"RUF100", # unused noqa
"S", # flake8-bandit
"UP", # pyupgrade
"W", # warning
]
fixable = ["C4", "E", "F", "I", "UP"]
# E501: Line too long
ignore = ["E501"]
[lint.isort]
known-first-party = ["wagtail_polymath"]
lines-after-imports = 2
lines-between-types = 1
[lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # asserts allowed in tests
"ARG", # unused function args (pytest fixtures)
"FBT", # booleans as positional arguments (@pytest.mark.parametrize)
"PLR2004", # magic value used in comparison
"S311", # standard pseudo-random generators are not suitable for cryptographic purposes
]
"setup.py" = ["S605", "S607"]
[format]
docstring-code-format = true