-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add default for the disable option #7111
Conversation
Pull Request Test Coverage Report for Build 2601467310
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this approach is that we're breaking some assumption about the way the disable work. I.e. when disabling one message the user would be in fact enabling all the messages we disable by default. I think the disabling need to take place in the checker code maybe the message definition directly; maybe a configuration in the spirit of templating the configuration (i.e. using google pylint template, or netflix pylint template...).
That's basically what #1353 is referring to, but we just closed that 😄 |
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 33ceaba |
I did not like #1353 because it would make this accessible to the user. I don't think our decision concerning what is a default check or not should be modifiable by the user. It's just something that is internal to pylint. The disable/enable option that the user have come on top of it and are sufficient imo. Although being able to handle a pylint template internally instead of having to define an additonal option in the message definition dict would be a better design and would permit to handle a template externally too (i.e. users would be able to distribute what they think should be pylint configuration without copy pasting 500 lines of toml). |
If we handle this value like that it would deviate from all other options. For example, for I can understand why this feels not so user-friendly, but singling out |
I strongly agree and for that reason am -1 on the current proposal (sorry!)
Sure, but if we find another implementation, then we're not exposing it to the user at all, and then there's no deviation to bother a user with. |
I don't really understand how we're "breaking an assumption" here. Why is the assumption not: if you overwrite a default value you lose the default value? Imo, that's a much stronger assumption that's already being used in a number of other places.
We already have that implementation: we can simply move the messages we don't want to be turned on by default to the extensions. I thought the issue was about finding a sane default for |
There's no problem with that if you take for granted
Yep, I would be much more in favor of that solution. And it matches the current documentation. It might be laborious to extricate some of the messages from their current checkers, but that should be balanced I suppose against maintaining a more complicated solution in the checker/disabling implementation, which is what I'm hearing you express hesitation about (I agree!) |
Let's do that then 👍 |
That's fine, if it's opt-in. This is kind of like Pierre's idea:
|
(I'll move this discussion to the issue.) |
Type of Changes
Description
Closes #3512.
Finally.