44

Recent versions of pylint allow for suppressing messages with human readable message ids. For example, instead of

class MyTest(unittest.TestCase):  # pylint: disable=R0904
    ...

you can specify:

class MyTest(unittest.TestCase):  # pylint: disable=too-many-public-methods
    ...

This page lists the numeric message ids. However, I'm looking for a complete list of the human readable versions of the message ids. Where can I find that list?

leppie
  • 115,091
  • 17
  • 196
  • 297
Frank Niessink
  • 1,611
  • 12
  • 24
  • 4
    Why this question was marked as off topic seems to be beyond human comprehension. The author asked for a place that lists all human readable messages not about opinion about them. – Drachenfels Dec 10 '18 at 15:42

4 Answers4

60

I don't think there exists (yet) such list on the web, though pylint --list-msgs automatically produces one.

podshumok
  • 1,649
  • 16
  • 20
sthenault
  • 14,397
  • 5
  • 38
  • 32
  • No longer true, see my answer below for the link to the pylint docs online: https://stackoverflow.com/a/70829006/733309 – JohnKlehm Jan 24 '22 at 04:28
31

I've stumbled upon your question, searching for such a list myself. So I decided to process pylint --list-msgs through regex. Then I created such a list. You can access it here.

bowl
  • 559
  • 6
  • 12
  • Nice, but it seems quite a few of the descriptions are incomplete. For example: "empty-docstring C0112 - Empty %s docstring Used when a module, function, class or method has an empty docstring (it would be too easy" <- incomplete description – Frank Niessink Oct 06 '16 at 14:52
  • @FrankNiessink, thanks for pointing this out. My regex was off. Could not handle it, so changed way i split output. – bowl Oct 09 '16 at 09:53
2

Here is a dictionary of pylint errors to message for the most the most updated version of the pylint --list-msgs.

The format is PYLINT_ERROR_ID: ERROR_MESSAGE.

ethanchewy
  • 552
  • 1
  • 3
  • 14
  • 1
    +1 for the info, however it doesn't include the abbreviations OP wanted, just the codes and full messages. – TextGeek Feb 18 '20 at 15:36
2

You can find it buried in the pylint documentation here: https://pylint.pycqa.org/en/latest/technical_reference/features.html#pylint-checkers-options-and-switches

Ignitor
  • 2,907
  • 33
  • 50
JohnKlehm
  • 2,368
  • 15
  • 9