-
Notifications
You must be signed in to change notification settings - Fork 22
/
pyproject.toml
126 lines (118 loc) · 1.88 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[tool.black]
exclude = '''
.git
.hg
.tox
venv
.venv
_build
build
dist
'''
[tool.ruff]
line-length = 119
exclude = [
"**/migrations/**",
".env",
".venv",
]
lint.select = [
"E",
"F",
"I",
"W",
]
lint.ignore = [
"E501", # line too long
"E701", # multiple statements on one line (colon)
"F401", # module imported but unused
"F403", # 'from module import *' used; unable to detect undefined names
]
[tool.isort]
line_length = 119
skip = [
"manage.py",
"*migrations*",
".tox",
".eggs",
".env",
".venv",
"data",
]
include_trailing_comma = true
multi_line_output = 5
lines_after_imports = 2
default_section = "THIRDPARTY"
sections = [
"FUTURE",
"STDLIB",
"DJANGO",
"CMS",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER",
]
known_first_party = "djangocms_link"
known_cms = [ "cms", "menus" ]
known_django = "django"
[tool.flake8]
max-line-length = 120
select = [
"C",
"E",
"F",
"W",
"B",
"B950",
]
ignore = [
"W503", # line break before binary operator
]
exclude = [
"*.egg-info",
".eggs",
".env",
".git",
".settings",
".tox",
".venv",
"build",
"data",
"dist",
"docs",
"*migrations*",
"requirements",
"tmp",
]
[tool.coverage.run]
branch = true
source = [ "djangocms_frontend" ]
omit = [
"djangocms_frontend/migrations/*",
"djangocms_frontend/management/*",
"*/foundation6.py",
"tests/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
]
ignore_errors = true
[tool.djlint]
ignore = "H023,T003,H006,H031,D018,H021,H025"
profile = "django"
[tool.djlint.rule]
name = "D034"
message = ".pk or .id should only be used with \"|unlocalize\""
flags = "re.DOTALL|re.I"
patterns = [
'{{\s*[a-zA-Z0-9_.]+\.pk\s*}}',
'{{\s*[a-zA-Z0-9_.]+\.id\s*}}',
]