Questions tagged [pylint]

Pylint is a Python source code analyzer looking for bugs and signs of poor quality.

Pylint is a Python tool that checks if a module satisfies a coding standard.

1691 questions
19
votes
3 answers

Why Pylint is too slow while pep8 just takes a second to check the same code?

I do not understand why pylint takes about 5 minutes to check my code, where pep8 takes only 1 sec. I use Mac and I have pylint 1.8.4 installed through conda install -c conda-forge pylint. Pylint is very slow either I use Terminal or the Spyder…
Sahar
  • 741
  • 1
  • 8
  • 14
19
votes
4 answers

Options for linting Cython code

I have a Cython module that I would like to lint PEP8 style, however pylint syntax errors on Cython cdef syntax. Does anyone have a suggestion about how to maintain Python coding standards for Cython code?
Rich
  • 12,068
  • 9
  • 62
  • 94
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
1 answer

pylint (pylint_django) does not work when --django-settings-module flag is specified

I am using newest version of pylint_django released few days ago: Package Version ----------------------------- ---------- pylint 2.7.4 pylint-django 2.4.3 pylint-plugin-utils …
kbonna
  • 211
  • 1
  • 4
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

Pylinter in Sublime text 3.1.1 still doesn't use Python2.7

Here are my pylinter settings: { // When versbose is 'true', various messages will be written to the console. // values: true or false "verbose": false, // The full path to the Python executable you want to …
LittleBobbyTables
  • 4,361
  • 9
  • 38
  • 67
18
votes
2 answers

Disable pylint message for a given module or directory

Is there a way to disable Pylint's duplicate-code message just for test files? All of the tests in our project are DAMP so the duplicated code is by design. I understand we can add # pylint: disable=duplicate-code throughout our tests, but would…
TinyTheBrontosaurus
  • 4,010
  • 6
  • 21
  • 34
18
votes
3 answers

Adding a path to sys.path in python and pylint

So. I'm aware that this question seems to have been asked to death, but none of the answers seem to address what I want to do. I have a library in another directory that I want to include in a set of other projects that I run. I don't want that…
bnsh
  • 800
  • 2
  • 6
  • 20
18
votes
1 answer

Pylint Error Message: "E1101: Module 'lxml.etree' has no 'strip_tags' member'"

I am experimenting with lxml and python for the first time for a personal project, and I am attempting to strip tags from a bit of source code using etree.strip_tags(). For some reason, I keep getting the error message: "E1101: Module 'lxml.etree'…
Aaron Viscichini
  • 257
  • 3
  • 13
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
18
votes
1 answer

What pylint options can be specified in inline comments?

I note that I can disable particular messages using a comment. For example, pylint by default complains about variable names of less than three letters. I can suppress that like this: # pylint: disable=invalid-name def some_string_operation(s): #…
Andrew
  • 4,058
  • 4
  • 25
  • 37
18
votes
2 answers

Reason for low Pylint ratings of Python standard library code

A friend told me about Pylint and just out of curiosity, I ran it against some of the standard library modules. To my surprise, the ratings were low. Here are a few runs: os.py Your code has been rated at 3.55/10 random.py Your code has been rated…
Joshua
  • 181
  • 1
  • 3
18
votes
2 answers

How to disable pylint no-self-use warning?

I'm coding in Python3 and using pylint to keep my code clean. I want to define something like interface class, so I could add more functionality in a clean and concise way, however, pylint gets in the way of this goal. Here's a sample method: def…
julka
  • 1,172
  • 2
  • 13
  • 29
18
votes
2 answers

pylint: ignore multiple in rcfile

In my django project I'm using an externally written app which is badly written. Now I want to ignore this app from my pylint reporting, however I can't get pylint to ignore it. Pylint is already ignoring the South migrations, like…
Bouke
  • 11,768
  • 7
  • 68
  • 102
17
votes
2 answers

How to fix pylint warning "Abstract class not referenced"?

I have a Python class that raises "NotImplementedError" for a couple of methods and the class is inherited by a few other classes which are defined in their own files. When I run Pylint on the file that has the abstract class, it always complains…
Jack Z
  • 2,572
  • 4
  • 20
  • 17