forked from django-cms/django-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
85 lines (77 loc) · 1.53 KB
/
pyproject.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
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
80
81
82
83
84
85
[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
line-length = 119
extend-exclude = [
".ruff_cache",
".env",
".venv",
"**migrations/**",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"PLE", # pylint error
"PLR", # pylint refactor
"PLW", # pylint warning
"UP", # pyupgrade
]
extend-ignore = [
"C901", # Too complex
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
# TODO fix separately
"B006",
"B007",
"B027",
"B028",
"B018",
"B020",
"B026",
"B904",
"C400",
"C402",
"C405",
"C408",
"C414",
"C416",
"E701",
"F401",
"F403",
"E501",
"PLR2004",
"PLR5501",
"PLW0120",
"PLW0603",
"PLW0602",
"PLW2901",
"UP028",
"UP030",
"UP031",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401" # unused-import
]
"menus/menu_pool.py" = [
"PLW2901", # `for` loop variable `menu_cls` overwritten by assignment target
]
"cms/toolbar/utils.py" = [
"B020" # Loop control variable `plugin` overrides iterable it iterates
]
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 80