Skip to content
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

Accept a comma-separated list of messages IDs in --help-msg #7490

Merged
merged 3 commits into from Sep 19, 2022

Conversation

DanielNoord
Copy link
Collaborator

  • Write a good description on what the PR does.
  • Create a news fragment with towncrier create <IssueNumber>.<type> which will be
    included in the changelog. <type> can be one of: new_check, removed_check, extension,
    false_positive, false_negative, bugfix, other, internal. If necessary you can write
    details or offer examples on how the new change is supposed to work.
  • If you used multiple emails or multiple names when contributing, add your mails
    and preferred name in script/.contributors_aliases.json

Type of Changes

Type
🐛 Bug fix

Description

Closes #7471.

@DanielNoord DanielNoord added Bug 🪲 Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Sep 19, 2022
@DanielNoord DanielNoord added this to the 2.15.3 milestone Sep 19, 2022
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward. I would have thought that the parsing would be done by the same function that disable/enable (to handle "all") but it works and it's simple.

@@ -158,6 +158,8 @@ def __call__(
option_string: str | None = "--help-msg",
) -> None:
assert isinstance(values, (list, tuple))
assert isinstance(values[0], str)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we change the typing line 157 then ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typing comes from argparse. I believe mypy starts complaining if we narrow down in the signature.

@DanielNoord
Copy link
Collaborator Author

Looks pretty straightforward. I would have thought that the parsing would be done by the same function that disable/enable (to handle "all") but it works and it's simple.

That function isn't really accessible. I changed it to use the csv checker though.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3082035324

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 95.32%

Totals Coverage Status
Change from base Build 3080589804: 0.001%
Covered Lines: 17048
Relevant Lines: 17885

💛 - Coveralls

@github-actions
Copy link
Contributor

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit 35a5a6f

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@Pierre-Sassoulas Pierre-Sassoulas merged commit a5c8e23 into pylint-dev:main Sep 19, 2022
@DanielNoord DanielNoord deleted the hlp-msg branch September 19, 2022 12:12
@Pierre-Sassoulas Pierre-Sassoulas added Backported and removed Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer labels Sep 19, 2022
Pierre-Sassoulas pushed a commit to Pierre-Sassoulas/pylint that referenced this pull request Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--help-msg no longer accepts comma separate messages since v2.14.0
3 participants