-
-
Notifications
You must be signed in to change notification settings - Fork 429
/
.ruff.toml
137 lines (94 loc) · 2.2 KB
/
.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
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
127
128
129
130
131
132
133
134
135
136
137
# https://beta.ruff.rs/docs/rules/
lint.select = [
# rules from pyflakes
"F",
# rules from pycodestyle
"E", "W",
# rules from mccabe
"C90",
# rules from isort
"I",
# rules from pyupgrade
"UP",
# rules from flake8-2020
"YTT",
# rules from flake8-annotations
# "ANN",
# rules from flake8-bandit
"S",
# rules from flake8-blind-except
"BLE",
# rules from flake8-boolean-trap
# TODO: "FBT",
# rules from flake8-bugbear
"B",
# rules from flake8-builtins
"A",
# rules from flake8-commas
"COM",
# rules from flake8-comprehensions
"C4",
# rules from flake8-datetimez
# TODO: "DTZ",
# rules from flake8-debugger
"T10",
# rules from flake8-django
"DJ",
# rules from flake8-errmsg
"EM",
# rules from flake8-executable
"EXE",
# rules from flake8-implicit-str-concat
"ISC",
# rules from flake8-import-conventions
"ICN",
# rules from flake8-logging-format
"G",
# rules from flake8-no-pep420
"INP",
# rules from flake8-pie
# TODO: "PIE",
# rules from flake8-print
"T20",
# rules from flake8-pyi
"PYI",
# rules from flake8-pytest-style
# TODO: "PT",
# rules from flake8-raise
"RSE",
# rules from flake8-return
"RET",
# rules from flake8-self
# TODO: "SLF",
# rules from flake8-simplify
"SIM",
# rules from flake8-tidy-imports
"TID",
# rules from flake8-type-checking
"TCH",
# rules from flake8-gettext
"INT",
# rules from flake8-unused-arguments
# TODO: "ARG",
# rules from flake8-use-pathlib
"PTH",
# removes unused noqa comments
"RUF100",
]
lint.ignore = [
"COM812", # missing trailing comma, covered by black
"ANN101", # ignore missing type annotation in self parameter
"S311", # ignore Standard pseudo-random generators because they are not used for cryptographic purposes
]
fix = true
target-version = "py38"
[lint.flake8-tidy-imports]
## Disallow all relative imports.
ban-relative-imports = "all"
[lint.per-file-ignores]
# ignore assert statements in tests
"tests/*.py" = ["S101"]
# ignore SECRET_KEY in settings files in tests
"tests/settings/*.py" = ["S105"]
# pickle is used on purpose and its use is discouraged
"django_redis/serializers/pickle.py" = ["S301"]