-
-
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
Use the default config in the messages documentation tests #7142
Conversation
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.
That's already a great change, but how about we also show the configuration file in the documentation ? That way :
- it's immediately obvious what need to be done to activate the check if it's an extension, or a standard but optional check (soon ™️).
- We can create simpler example by lowering the values to something sane (i.e. max line length = 15 instead of having 120+ character in the example, max-return-values = 2 ...)
- While at the same time demonstrating some options that can affect the message (!)
What do you think ?
This can be seen by looking at the
You can use a dedicated |
[MAIN] | ||
load-plugins = pylint.extensions.bad_builtin |
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.
My suggestion is to show this ini configuration in this page : https://pylint.pycqa.org/en/latest/user_guide/messages/warning/bad-builtin.html?highlight=bad-builtin
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.
We already have:
This message is emitted by the optional 'deprecated_builtins' checker which requires the pylint.extensions.bad_builtin plugin to be loaded.
on that page?
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.
And then we could add:
bad-functions = ["map", "filter", "something_custom"]
to this, and demonstrate very succinctly how to add new bad builtins.
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.
Let's do that in another PR. There are a lot of moving pieces with that as well:
How to identify related options? How to show the difference between the default value and the value being used in a test? How to handle duplication of the load-plugins
warning.
I really intended this PR to unblock some of the PRs that do have correct examples.
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.
We already have: This message is emitted by the optional ...
Sure but that's text, and there's two click to reach the possible options. Code that is guaranteed to work alongside with an example is a lot nicer imo.
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.
Sure ! Thank you for this, great PR that open a lot of possibilities.
Pull Request Test Coverage Report for Build 2628103770
💛 - Coveralls |
Yeah, that's a problem for us and for user alike 😄 |
@Pierre-Sassoulas Can you turn on the |
Opened #7143
Sure ! (And I'm still trying to give you the right to do that :) ) |
The option is:
But I think it makes it mandatory and we ruled against this because there is a very high number of commit in pylint each day and being forced to update to the latest main was being very harsh on the github actions runners for often no reasons (it's not often that we have incompatible branch). I agree that having to fix a conflict or add a remote locally is very annoying. What do you think ? |
Ah yeah, probably best to keep it off. Too bad.. |
For what it's worth I contemplated voluntarily creating conflicts with the online editor so it's possible to merge main from the interface 😄 But now that I'm used to adding remote and removing them right after it's isn't that bad. But it's annoying to not have an option to do that without it being mandatory. |
That said, sometimes I want to fix/merge a PR from the browser and I don't think you can pull/merge |
Type of Changes
Description
Will unblock #7070 and others as it changes the value for
max-return-values
from our own11
to the default of6
.