Skip to content

Commit 2fb5367

Browse files
committed
Move Pylint config to .pylintrc.toml, remove default config values
1 parent b57760b commit 2fb5367

File tree

2 files changed

+53
-82
lines changed

2 files changed

+53
-82
lines changed

Diff for: {{cookiecutter.project_name}}/.pylintrc.toml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[tool.pylint.main]
2+
ignore = [
3+
".git",
4+
"__pycache__",
5+
".venv",
6+
"venv",
7+
"tests",
8+
"migrations",
9+
"settings",
10+
"snapshots",
11+
]
12+
disable = [
13+
"missing-module-docstring",
14+
"missing-class-docstring",
15+
"missing-function-docstring",
16+
"unused-argument",
17+
"redefined-builtin",
18+
"import-outside-toplevel",
19+
"no-else-return",
20+
"unspecified-encoding",
21+
"duplicate-code",
22+
"super-with-arguments",
23+
"unsubscriptable-object",
24+
"abstract-method",
25+
]
26+
27+
[tool.pylint.master]
28+
load-plugins=[
29+
"pylint_django",
30+
"pylint.extensions.for_any_all",
31+
"pylint.extensions.consider_ternary_expression",
32+
"pylint.extensions.mccabe",
33+
]
34+
django-settings-module = "app.settings.base"
35+
36+
[tool.pylint.basic]
37+
good-names = ["i", "j", "k", "v", "ex", "pk", "r", "_"]
38+
39+
[tool.pylint.design]
40+
max-args = 12
41+
max-locals = 16
42+
max-attributes = 30
43+
max-parents = 20
44+
min-public-methods = 0
45+
max-public-methods = 10
46+
max-branches = 15
47+
max-statements = 50
48+
max-bool-expr = 10
49+
max-returns = 10
50+
51+
[tool.pylint.format]
52+
max-module-lines = 500

Diff for: {{cookiecutter.project_name}}/pyproject.toml

+1-82
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ flake8-bugbear = "^24.2.6"
3737
flake8-rst-docstrings = "^0.3.0"
3838
mypy = "^1.9.0"
3939
pylint = "^3.1.0"
40+
pylint-django = "^2.5.4"
4041
safety = "^3.1.0"
4142

4243
[tool.black]
@@ -185,85 +186,3 @@ max-name-length = 60
185186
max-line-length = 100
186187
count = true
187188

188-
189-
[tool.pylint.main]
190-
ignore = [
191-
".git",
192-
"__pycache__",
193-
".venv",
194-
"venv",
195-
"tests",
196-
"migrations",
197-
"settings",
198-
"snapshots",
199-
]
200-
201-
[tool.pylint.master]
202-
load-plugins=[
203-
"pylint_django",
204-
]
205-
django-settings-module = "app.settings.base"
206-
207-
[tool.pylint.basic]
208-
good-names = ["i", "j", "k", "v", "ex", "pk", "r", "_"]
209-
210-
[tool.pylint.classes]
211-
# List of method names used to declare (i.e. assign) instance attributes.
212-
defining-attr-methods = ["__init__", "__new__", "setUp", "asyncSetUp", "__post_init__"]
213-
214-
# List of member names, which should be excluded from the protected access
215-
# warning.
216-
exclude-protected = ["_asdict", "_fields", "_replace", "_source", "_make", "os._exit"]
217-
218-
# List of valid names for the first argument in a class method.
219-
valid-classmethod-first-arg = ["cls"]
220-
221-
# List of valid names for the first argument in a metaclass class method.
222-
valid-metaclass-classmethod-first-arg = ["mcs"]
223-
224-
[tool.pylint.design]
225-
max-args = 12
226-
max-locals = 16
227-
max-attributes = 30
228-
max-parents = 20
229-
min-public-methods = 0
230-
max-public-methods = 10
231-
max-branches = 15
232-
max-statements = 50
233-
max-bool-expr = 10
234-
max-returns = 10
235-
236-
[tool.pylint.format]
237-
max-line-length = 100
238-
max-module-lines = 500
239-
240-
[tool.pylint."messages control"]
241-
confidence = [
242-
"HIGH",
243-
"CONTROL_FLOW",
244-
"INFERENCE",
245-
"INFERENCE_FAILURE",
246-
"UNDEFINED",
247-
]
248-
disable = [
249-
"missing-module-docstring",
250-
"missing-class-docstring",
251-
"missing-function-docstring",
252-
"unused-argument",
253-
"redefined-builtin",
254-
"import-outside-toplevel",
255-
"no-else-return",
256-
"unspecified-encoding",
257-
"duplicate-code",
258-
"super-with-arguments",
259-
"unsubscriptable-object",
260-
"abstract-method",
261-
]
262-
263-
[tool.pylint.typecheck]
264-
ignored-classes = [
265-
"optparse.Values",
266-
"thread._local",
267-
"_thread._local",
268-
"argparse.Namespace",
269-
]

0 commit comments

Comments
 (0)