You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 linter.global_set_option.called_with("whatever", "really", "anything") and it would still pass. That's a bit too much magic. :)
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: