Questions tagged [pylintrc]
90 questions
1
vote
2 answers
How to add custom pylint warning?
I want to add a warning message to my pylint for all print statements reminding myself I have them in case I print sensitive information. Is this possible? I can only find answers about disabling pylint errors, not enabling new ones.

bnykpp
- 55
- 1
- 5
1
vote
1 answer
load customize pylint plugin
I am trying to write simple pylint plugin but getting following error any input.
__init__py
"""
Register all plugin
"""
#!/usr/bin/env python
from .check_os_walk import check_os_walk
def register(linter):
"""
entry…

user765443
- 1,856
- 7
- 31
- 56
1
vote
0 answers
Warning redefined-outer-name unexpectedly silenced
By default, pylint v2.9.6 gives this warning:
spam.py
"""Docstring."""
def spam():
"""Docstring."""
spam = 42
return spam
pylint warning
spam.py|6 col 5 warning| [redefined-outer-name] Redefining name 'spam' from outer scope (line 4)…

zatg98n4qwsb8heo
- 115
- 5
1
vote
1 answer
pylintrc configuration in visual studio code
I am currently trying to configure pylint to ensure high coding standards in a particular project.
My problem is that somehow I am not really able to configure pylint the way I would like. First I tried to use the normal settings in VSC to configure…

Jan
- 23
- 1
- 6
1
vote
0 answers
Pylint failing with 10/10 for duplicate code messages
I'm having an issue with Pylint. In our project, we have several tests set up that have the same exceptions. Pylint is reading these as duplicate code (I'm getting the "Similar lines in * files" message), but the problem is that it isn't reducing…

Nick
- 41
- 2
1
vote
0 answers
fail-under flag does not work with pylint
I am running pylint on my code:
pylint package --fail-under=8 --rcfile=pylintrc
Here is my rcfile:
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,e,_
# Private entries do not need…

CyberPunk
- 1,297
- 5
- 18
- 35
1
vote
2 answers
How to ignore a specific Pylint message in Atom Editor?
I am using the Pylint linter package in atom on Windows
when ever i use tab indentation it gives me the following error:
W0311 Bad indentation Found 1 spaces, Expected 4.
even though atom is using a 'tab' (tab type is hard)
I created a .pylintrc…

irfan43
- 46
- 3
1
vote
0 answers
How to run pylintrc file as default when running pylint?
I want to always enable an extension in pyLint on my local machine, for instance the 'else-if' extension.
I tried editing the pylintrc file following this in the home directory of the project adding load-plugins=pylint.extensions.check_elif
When I…

Or b
- 666
- 1
- 5
- 22
1
vote
0 answers
Is it possible to disable pylint in a line based on its contents?
With coverage it's possible to disable coverage in lines that match a pattern by adding the "exclude_lines" flag to the configuration file:
[report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
I was wondering if the same thing is…

drakenation
- 382
- 3
- 15
1
vote
1 answer
Pylint errors-only in text editor
I'm using pylint with Sublime Text. I can get pylint to ignore certain warnings by putting the following at the top of the file.
# pylint: disable = some-option, another-option, a-third-option
I want pylint to disable all warnings in a file, not…

efthimio
- 592
- 5
- 19
1
vote
1 answer
Disable pylint protected-access just for unit tests
I have a helper function called _prepend_order in a Python module. I would like to unit test it. I also want my unit test (test_extract_users.py) to pass our linter, pylint. We are trying to avoid use of directives like #pylint:…

dumbledad
- 16,305
- 23
- 120
- 273
1
vote
1 answer
Is there a global pylint configuration?
I want to set some pylint settings globally but I don't know if there is an global pylint configuration or where it is...
I know there is an .pylintrc file but it's not a global configuration.
So my question is how to set pylint settings globally.

user38
- 151
- 1
- 14
1
vote
1 answer
Find what settings influence a given Pylint message
When Pylint warns me about something, how can I know what settings it's applying? And what section of .pylintrc this setting goes in?
For example:
Used builtin function 'map'. Using a list comprehension can be clearer. (bad-builtin) is because…

Gilles 'SO- stop being evil'
- 104,111
- 38
- 209
- 254
1
vote
1 answer
Pylintrc config to only show errors
I can't find a simple ~/.pylintrc file for ignoring everything but errors.
Currently I have it set to this:
[MESSAGES CONTROL]
disable=W
From this similar stackoverflow answer. In theory this should remove warnings but it doesn't work for me, even…

Vincent Tang
- 3,758
- 6
- 45
- 63
1
vote
2 answers
Default pylintrc completely disables pylint
All I want to do is use the generated-members= line to disable the false "no-members" errors for several packages.
So, in the VS Code terminal, in my project root directory, I run:
pylint --generate-rcfile > .pylintrc
All linting warnings…

Tristan Brown
- 561
- 5
- 10