Skip to content

Commit 0a4331d

Browse files
Move the pylint configuration to pyproject.toml
1 parent ec51408 commit 0a4331d

File tree

3 files changed

+48
-45
lines changed

3 files changed

+48
-45
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,4 @@ repos:
5252
entry: bash -c 'test -d .venv && . .venv/bin/activate ; pylint "$@"' -
5353
language: system
5454
types: [ python ]
55-
exclude: "tests/input/"
5655
args: ["-sn", "-rn"]

.pylintrc

Lines changed: 0 additions & 44 deletions
This file was deleted.

pyproject.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,51 @@ convention = "google"
107107
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
108108
"PLR2004", # Magic value used in comparison
109109
]
110+
111+
[tool.pylint]
112+
113+
load-plugins= [
114+
"pylint_pytest",
115+
"pylint.extensions.bad_builtin",
116+
"pylint.extensions.broad_try_clause",
117+
"pylint.extensions.check_elif",
118+
"pylint.extensions.code_style",
119+
"pylint.extensions.comparetozero",
120+
"pylint.extensions.comparison_placement",
121+
"pylint.extensions.confusing_elif",
122+
# "pylint.extensions.consider_ternary_expression", # Not a pretty refactoring
123+
"pylint.extensions.docparams",
124+
"pylint.extensions.docstyle",
125+
"pylint.extensions.emptystring",
126+
"pylint.extensions.eq_without_hash",
127+
"pylint.extensions.for_any_all",
128+
"pylint.extensions.mccabe",
129+
"pylint.extensions.no_self_use",
130+
"pylint.extensions.overlapping_exceptions",
131+
"pylint.extensions.redefined_loop_name",
132+
"pylint.extensions.redefined_variable_type",
133+
"pylint.extensions.typing",
134+
# "pylint.extensions.while_used", # highly opinionated
135+
"pylint.extensions.dict_init_mutate",
136+
"pylint.extensions.dunder",
137+
"pylint.extensions.typing",
138+
# "pylint.extensions.magic_value", # highly opinionated
139+
]
140+
disable=[
141+
"unspecified-encoding",
142+
"fixme",
143+
"missing-docstring",
144+
"attribute-defined-outside-init",
145+
"use-maxsplit-arg",
146+
"used-before-assignment",
147+
"too-many-arguments",
148+
"too-many-nested-blocks",
149+
"too-many-try-statements",
150+
"redefined-loop-name",
151+
"docstring-first-line-empty",
152+
"confusing-consecutive-elif",
153+
"too-complex",
154+
"cannot-enumerate-pytest-fixtures", # our own message, fix first
155+
"duplicate-code",
156+
]
157+
ignore-paths="tests/input"

0 commit comments

Comments
 (0)