-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathruff.toml
More file actions
77 lines (77 loc) · 1.75 KB
/
ruff.toml
File metadata and controls
77 lines (77 loc) · 1.75 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
target-version = "py39"
line-length = 120
exclude = [
"docs",
"manage.py",
"tests",
]
format.preview = true
format.docstring-code-line-length = 120
format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.ignore = [
"ANN401", # Dynamically typed expressions
"COM812",
"CPY", # Missing copyright notice
"D", # docstring
"DOC", # docstring
"E731", # Do not assign a `lambda` expression,
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use a f-string literal, assign to variable first
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"N806", # Variable `...` in function should be lowercase
"S308", # Use of `mark_safe` may expose cross-site scripting vulnerabilities
"SLF001", # Private member accessed: `...`
"TRY003", # Avoid specifying long messages outside the exception class
"TRY301", # Abstract `raise` to an inner function
"TRY401", # Redundant exception object included in `logging.exception` call
"UP037", #
]
lint.per-file-ignores."src/**/migrations/*.py" = [
"RUF012",
]
lint.per-file-ignores."docs/conf.py" = [
"A001", #
"D100", #
"ERA001", #
"INP001", #
]
lint.per-file-ignores."src/**/version.py" = [
"ALL",
]
lint.per-file-ignores."tests/**/*.py" = [
"A",
"ANN",
"ARG",
"B",
"BLE",
"D",
"DJ",
"DTZ",
"ERA",
"F",
"FBT",
"FURB",
"INP",
"N",
"PGH",
"PLC",
"PLR",
"PLW",
"PT",
"PTH",
"PYI",
"RUF",
"S",
"SIM",
"TC",
"UP",
]
lint.isort = { known-first-party = [ "adminfilters" ] }
lint.pylint.max-args = 7
lint.pylint.max-branches = 14
lint.pylint.max-nested-blocks = 8
lint.preview = true