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
Fix recognition of files named setup.cfg
(#3630)
#6577
Fix recognition of files named setup.cfg
(#3630)
#6577
Conversation
Pull Request Test Coverage Report for Build 2582528056
💛 - Coveralls |
@@ -0,0 +1 @@ | |||
{} |
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.
Here's it's strange that we have no value set for init-hook
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.
Yeah, this should have a value I think. But I'm not 100% sure since this is one of the "pre-processed" options so it might be a bit broken.
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.
Other than the first test (which I agree seems like it is still broken) I don't think the other tests add much value? Those regressions are covered by other tests I think.
If anything, we should probably add comments or change the file names to reflect the issues.
Also note, with the migration to argparse
there is now slightly different behaviour between setup.cfg
and myconfig.cfg
. As for setup
we require pylint.
section names (although we still support [MASTER]
. It might be necessary to use a setup.cfg
name instead.
@@ -0,0 +1,3 @@ | |||
# Wrong header ? | |||
[tool.pylint.MASTER] | |||
init-hook="from pylint.config import find_pylintrc;" |
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.
Shall we use something like print()
so we can actually check the init-hook
is executed?
@@ -0,0 +1 @@ | |||
{} |
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.
Yeah, this should have a value I think. But I'm not 100% sure since this is one of the "pre-processed" options so it might be a bit broken.
@@ -0,0 +1,2 @@ | |||
************* Module Command line or configuration file |
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.
What is this testing? This seems a little redundant with all the other tests that check for (incorrect) section headers.
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.
Just took all the example from the issue :)
@Pierre-Sassoulas This is ready for review! |
setup.cfg
(#3630)
This comment has been minimized.
This comment has been minimized.
@@ -0,0 +1,3 @@ | |||
I should just print |
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.
This way of testing the init-hook
option is not new, but it's still clever and beautiful 😄
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Can't approve the MR I opened myself but let's merge this 👍 |
🤖 Effect of this PR on checked open source code: 🤖 Effect on pandas:
The following messages are no longer emitted:
Effect on pytest:
The following messages are no longer emitted:
This comment was generated for commit 604deac |
…pylint-dev#6577) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Type of Changes
Description
Closes #3630. It seems there's still some oddity, init_hook is not treated the same as other option apparentely.