Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the difference between pylint 'disable' and 'disable-msg'?

Tags:

python

pylint

I see some code with

# pylint: disable=W0123

and some has

# pylint: disable-msg=W0123

Are they just synonyms?

like image 961
poolie Avatar asked Oct 16 '12 02:10

poolie


People also ask

How do I know if a Pylint is ignoring a file?

you can ignore it by adding a comment in the format # pylint: disable=[problem-code] at the end of the line where [problem-code] is the value inside pylint(...) in the pylint message – for example, abstract-class-instantiated for the problem report listed above.

What is Pylint and how do you use it?

What is Pylint? It is a static code analysis tool to identify errors in Python code and helps programmers enforce good coding style. This tool enables them debugging complex code with less manual work. It is one of the tools which gets used for test-driven development (TDD).

How do I get rid of invalid name Pylint?

How do I get rid of invalid name pylint? Create an empty Python file called run-tests.py. At the top of the file, add # pylint: disable=invalid-name so that pylint won't complain about the module name.


1 Answers

disable-msg is deprecated as of pylint 0.21.0. Update it to just "disable" when older versions don't need to be supported anymore.

like image 140
Insidi0us Avatar answered Sep 19 '22 06:09

Insidi0us