Pylint: Disable specific warnings for modules in a specific folder
![](https://secure.gravatar.com/avatar/e9c331c4e0515977face85ee52ae5d37.jpg?s=120&d=mm&r=g)
Hi, I would like to disable a set of warnings for modules in a specific folder. Is this possible somehow? If not, can this feature be added? More specifically, we have a folder in our project which contains many function/unit test modules. Some Pylint-warnings, e.g., `invalid-name` and `protected-access` are not helpful in that context, and we would like to be able to disable those checks for all modules in that directory. Also, we would like to avoid adding #-disable boilerplate inside every single file; preferably we would like to add the folder-specific disables in the project's pylintrc-file. Here's my question on Stack Overflow for more context: http://stackoverflow.com/q/36182847/955014 -- Regards, Edward
![](https://secure.gravatar.com/avatar/3ad07138ac2e19eba258440e6ef4e042.jpg?s=120&d=mm&r=g)
Hey! * Edward Ekelund <edward.ekelund@axis.com> [2016-03-23 17:09:51 +0000]:
I would like to disable a set of warnings for modules in a specific folder. Is this possible somehow?
If not, can this feature be added?
There's an open issue for it since a while: https://github.com/PyCQA/pylint/issues/618 There was some work on it, but the person who started working on it unfortunately never submitted a pull request :(
More specifically, we have a folder in our project which contains many function/unit test modules. Some Pylint-warnings, e.g., `invalid-name` and `protected-access` are not helpful in that context, and we would like to be able to disable those checks for all modules in that directory.
Also, we would like to avoid adding #-disable boilerplate inside every single file; preferably we would like to add the folder-specific disables in the project's pylintrc-file.
Personally I use a script to find my test files (as they don't have __init__.py files because I'm using py.test). That script also adds some disables: https://github.com/The-Compiler/qutebrowser/blob/master/scripts/dev/run_pyli... Florian -- http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/
participants (2)
-
Edward Ekelund
-
Florian Bruhin