Questions tagged [pylintrc]
90 questions
23
votes
5 answers
Method name doesn't conform to snake_case naming style
I’m creating a simple project with my pylintrc file and get this error for the test method:
method name - test_calculator_add_method_returns_correct_result - doesn't conform to snake_case naming style
class TddInPythonExample(unittest.TestCase):
…

user1050619
- 19,822
- 85
- 237
- 413
22
votes
1 answer
Pylint variable name doesn't conform to snake_case naming style
I have multiple warnings from pylint like that:
'''Variable name "df" doesn't conform to snake_case naming style'''
As I could understand, it happens because of variable name length less than 3 symbols. however I would like to use variables like df,…

Alexander
- 391
- 1
- 3
- 10
21
votes
4 answers
How to change the .pylintrc file that VS Code is using for linting?
We have a .pylintrc file committed to git in our project root that is used by our team which has many useful errors disabled. So VS Code doesn't show those. I want to know if I can use my own pylint rules only on my local machine without having to…

Garry Mccarthy
- 311
- 1
- 2
- 5
19
votes
2 answers
For Pylint, is it possible to have a different pylintrc file for each Eclipse project?
I saw I can change it per Eclipse instance using this solution.
I would like to set it per project. Is it possible?

bandit
- 839
- 4
- 10
- 26
18
votes
2 answers
How to disable pylint warnings and messages on Visual Studio Code?
I am using a Mac and programming with Python on VS Code. After installing pylint, I had a bunch of warnings and messages. How do I disable these? I know about adding some lines to the pylintrc file, but I don't know where to find it or how to create…

pixelrobin
- 183
- 1
- 1
- 4
18
votes
1 answer
Make Pylint care about blank lines
I am not a stickler for most things pep-8, but certain things I personally prefer when writing code (as opposed to for work, where I would adhere to the style or lack thereof of the existing code base).
One thing I personally tend to follow is…

elethan
- 16,408
- 8
- 64
- 87
15
votes
5 answers
Pylint: Disable Unnecessary "else" after "return" (no-else-return) warning
I'm looking through my RC file and I can't for the life of me, find which one of these variables disables that feature.
I searched for "if", "else" and "return" and I didn't see anything. Unless I've missed it.
Thanks.
More Info
pylint…

Yogurt
- 2,913
- 2
- 32
- 63
12
votes
2 answers
Simplifying line length with pre-commit, flake8, black, isort, pylint, etc
When using multiple tools that either check or format python files, is there a way to set line length once for all?
Currently I have:
.flake8 file:
max-line-length = 120
.isort.cfg file:
line-length = 120
.black file:
line-length = 120
.pylintrc…

Marjeta
- 1,111
- 10
- 26
10
votes
3 answers
VS Code pylint(import-error) "Unable to import" subsub-module from custom directory
I have organized my self-written Python scripts within a tree of several sub-directories,
starting from the parent directory "Scripts" which is already included in "python.autoComplete.extraPaths" within the…

Andreas L.
- 3,239
- 5
- 26
- 65
8
votes
2 answers
How can I change pylint tab width from 4 spaces to 2 spaces?
I have tried pylint --indent-string=" ", but I keep getting the help message. What am I supposed to do to configure pylint.

Flair
- 2,609
- 1
- 29
- 41
8
votes
1 answer
Pylint UnicodeDecodeError utf-8 can't decode byte
When I run pylint installed with pip (version 2.1.1 and Python V.3.7) in windows 10, I get this error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte.
How do we fix it?
Here is the screenshot

Shyamala Gopalakrishnan
- 503
- 9
- 25
8
votes
1 answer
How to break a long line in .pylintrc file?
I have a PyLint configuration file, .pylintrc, with some rules defined.
However, for one rule, I have quite a few items which results in a very long line.
[TYPECHECK]
generated-members = XXX, YYY, ZZZ......
An example of a long line can be seen…

Alex Tereshenkov
- 3,340
- 8
- 36
- 61
7
votes
1 answer
Pylint 2.14.0 outputs (bad-option-value) for no-self-use, no-space-check
I have updated pylint version
Now it is complaining for no-self-use checker on .pylintrc file.
************* Module ../../.pylintrc
.pylintrc:1:0: E0015: Unrecognized option found: no-space-check (unrecognized-option)
.pylintrc:1:0: E0012: Bad…

R. Bogaveev
- 189
- 4
- 13
7
votes
0 answers
How do I get pylint to ignore unused-import for a single module, globally?
I use the typing module. I'd like to always use the code from typing import List, Set, Dict, Tuple, Optional without stopping to edit that line to reference only the types used in the current module.
But pylint complains "Usused foo imported from…

Kevin Kleinfelter
- 495
- 6
- 15
7
votes
3 answers
PyLint bad-whitespace Configuration
Is there a way to configure the checks for the bad-whitespace checks in PyLint? I can currently disable checking but I would much rather enforce a whitespace convention instead of disabling it.

FluxIX
- 325
- 1
- 2
- 13