Is it possible to run pylint with ignore of "# pylint: disable=" instructions?

Viewed 381

In order to identify smelly code I'd like to run pylint as if there were no # pylint: disable=* instructions (e.g. pylint: disable=broad-except).

Is it possible to disable disable itself on command line?

Of course I could create a temporary file with all # pylint: disable instructions removed but maybe pylint is smart enough to have this built in..

3 Answers

You can get these by enabling suppressed-message

pylint --enable=suppressed-message

I believe one of the following could help:

  • pylint --enable=locally-disabled module.py
  • pylint --enable=suppressed-message module.py
  • pylint --enable=all module.py

I dont how to disable pylint but i know how to override it's default settings, like this-

  1. In Your Working Directory create a file called .pylintrc
  2. Done!, For Example-
[FORMAT]
max-line-length=1000 -To override the default line length which is 100 
Related