Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable specific issues using filename pattern #2033

Closed
ghost opened this issue Apr 23, 2018 · 1 comment
Closed

Disable specific issues using filename pattern #2033

ghost opened this issue Apr 23, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 23, 2018

I often name my functions with an underscore prefix, and then I test them from an accompanying test_thing.py file. Pylint warns me about protected-access in the test file.

I think I want to prevent pylint from complaining about "protected-access" in test_*.py files. Pylint has ignore-patterns=test_.*.py, but I want to ignore test_*.py only for a particular warning, "protected-access". Currently I'm using # pylint: disable=protected-access at the top of each test file, but it'd be nice to avoid redundancy by specifying an ignore pattern for specific issues.

Is there a way to do that? If not, I think this feature might be useful.

@PCManticore
Copy link
Contributor

We don't support it, but we probably won't support this feature too soon. There's some work under way though to support multiple configuration files per directory, which means that you can at least control some of the error messages per each directory. See #1988 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant