This is a FAQ:
4.1 Is it possible to locally disable a particular message?
Yes, this feature has been added in Pylint 0.11. This may be done by adding
# pylint: disable=some-message,another-one
at the desired block level or at the end of the desired line of code.4.2 Is there a way to disable a message for a particular module only?
Yes, you can disable or enable (globally disabled) messages at the module level by adding the corresponding option in a comment at the top of the file:
# pylint: disable=wildcard-import, method-hidden # pylint: enable=too-many-lines
You can disable messages by:
E1101
, E1102
, etc.no-member
, undefined-variable
, etc.pylint --list-groups
.C
, R
, W
, etc.all
.See the documentation (or run pylint --list-msgs
in the terminal) for the full list of Pylint's messages. The documentation also provide a nice example of how to use this feature.