-
-
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
Crash when pyproject.toml disable = [ "array", "of", "items" ] #3538
Comments
Hi @bruceadams, I tried to tackle this: see pull request #3616. Thanks for providing the test above, I might have overlooked the existing test file. I'm sure that saved me some time, thank you. :) By the way, your test (and the existing tests it was based on) did not fail because they used MagicMock, which says "yes" to anything you throw at it. You could have said |
Fixes #3538 Before that, we had to use strings in a TOML configuration file, like this: enable = "use-symbolic-message-instead,useless-suppression" jobs = "10" suggestion-mode = "no" TOML supports rich types like list, integer and boolean. They make for a more readable and less error-prone file. We can now express the same configuration like this: enable = [ "use-symbolic-message-instead", "useless-suppression", ] jobs = 10 suggestion-mode = false
Fixes #3538 Before that, we had to use strings in a TOML configuration file, like this: enable = "use-symbolic-message-instead,useless-suppression" jobs = "10" suggestion-mode = "no" TOML supports rich types like list, integer and boolean. They make for a more readable and less error-prone file. We can now express the same configuration like this: enable = [ "use-symbolic-message-instead", "useless-suppression", ] jobs = 10 suggestion-mode = false
Steps to reproduce
pyproject.toml
Current behavior
Crash parsing
pyproject.toml
:Expected behavior
What I hope for is that the
pyproject.toml
above behaves the same as when the disable line looks like this.pylint --version output
Additional information
I tried adding a test for the behavior I want into https://github.com/PyCQA/pylint/blob/master/tests/test_config.py I was very surprised to have that test pass!
I can add that test in a PR, if you'd like. Here it is, just for reference:
The text was updated successfully, but these errors were encountered: