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

Check for pylint pragmas in __init__.py #9496

Closed
chaosflaws opened this issue Mar 11, 2024 · 2 comments
Closed

Check for pylint pragmas in __init__.py #9496

chaosflaws opened this issue Mar 11, 2024 · 2 comments
Labels
Discussion 🤔 Enhancement ✨ Improvement to a component Needs decision 🔒 Needs a decision before implemention or rejection

Comments

@chaosflaws
Copy link

Current problem

I would like to disable different pylint rules in my application code and my test code (specifically messages about certain missing docstrings).

Desired solution

There is an open issue for that (#2712), but I suppose this won't be supported soon. An easier solution to the problem I am facing would be to parse __init__.py files for pylint pragmas and, if present, apply them to all modules in that package.

Additional context

IMHO, this should greatly reduce the need for #2712, since with this addition, all file- and block-related exclusions, file-based exclusions and directory-based exclusions would be supported.

@chaosflaws chaosflaws added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Mar 11, 2024
@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component Discussion 🤔 Needs decision 🔒 Needs a decision before implemention or rejection and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Mar 12, 2024
@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Mar 12, 2024

We have a merge request open for per dir pylint configuration files #9395, which imo are better because it would be harder to miss that a package is affected by it and it would permit to configure more than just disable or enable. It would be easy to miss an __init__.py, assume it's empty and be surprised by it's effect.

@chaosflaws
Copy link
Author

Agreed, #9395 is the better solution, and is already in the works :-)

@Pierre-Sassoulas Pierre-Sassoulas closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion 🤔 Enhancement ✨ Improvement to a component Needs decision 🔒 Needs a decision before implemention or rejection
Projects
None yet
Development

No branches or pull requests

2 participants