Is there some magic to adding new messages to pylint? I've defined my new warning in checkers/classes.py by adding a new key/value pair to the MSGS dict: MSGS = { ... 'W0234': ('instance attribute %r is not used within the class', 'defined-attribute-not-accessed', 'Used when an attribute defined by the class is not accessed \ by the class itself.'), } but when I try to disable my new warning (W0324) with something like "# pylint: disable=C0302,W0324", it complains: E: 1: Bad option value 'W0324' Is there some sort of message compilation step which gathers all the keys from the MSGS dictionaries? I looked for all the places where "W0233" appeared, and tried to mimic that, but that would seem not to have been sufficient. I can see by the tracebacks that it is getting my new code. In fact, when I am unable to disable W0234, the checker emits the unused messages I'm trying to suppress, e.g.: W:113:ClassLevelMessage: instance attribute 'attr0' is not used within the class so I know my new code is being executed. Thx, Skip
participants (4)
-
Marius Gedminas
-
Martin Pool
-
Skip Montanaro
-
Sylvain Thénault