Running pylint on a file containing variables such as x
or l
will raise an error, though these variables might be meaningful in the context that they're in.
I could disable all such errors by adding the following to pyproject.toml
:
[tool.pylint."MESSAGES CONTROL"]
disable = [ "invalid-name"]
But I would prefer to be able to instead explicitly state the variables that I would like to ignore.
To ignore pylint errors for particular variable names the good-names
list can be set within pyproject.toml
as follows:
[tool.pylint."MESSAGES CONTROL"]
good-names = [
"x",
"y",
]
Which will make x
and y
valid variable names for pylint.