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

[deleted messages] Refactor the constant to be able to give a reason #6826

Merged

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Description

Refactor prior to #6824 in order to be able to give a reason for why the message was deleted, and better overall organization as deleted messages are not public and specific to pylint.messages.

@Pierre-Sassoulas Pierre-Sassoulas added Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer Maintenance Discussion or action around maintaining pylint or the dev workflow labels Jun 4, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.14.1 milestone Jun 4, 2022
@coveralls
Copy link

coveralls commented Jun 4, 2022

Pull Request Test Coverage Report for Build 2439084107

  • 36 of 36 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 95.53%

Totals Coverage Status
Change from base Build 2438650141: 0.007%
Covered Lines: 16286
Relevant Lines: 17048

πŸ’› - Coveralls

old_names: list[tuple[str, str]] = []


_DELETED_MSGID_PREFIXES: list[int] = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we underscore this file we can then not underscore anything else in this file πŸ˜„

Copy link
Member Author

Choose a reason for hiding this comment

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

Clever πŸ˜„

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

# Argparse by default allows abbreviations. It behaves differently
# if you turn this off, so we also turn it on. We mimick this
# if you turn this off, so we also turn it on. We mimic this
Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry about the unrelated change but I don't know why suddenly pre-commit pylint was not happy about this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I must have a dictionary with both mimic and mimick.

Copy link
Member Author

Choose a reason for hiding this comment

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

We might want to add to our own dictionary instead of disabling because the useless-suppression it will get annoying fast.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is because you removed a disable on L206.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I had the useless suppression, thougth it was a spellcheck issue, "fixed" "mimick" (suggestion from IDE) then still had an useless-suppression, and removed the disable. I think it's the dict that has "mimick" in it on ubuntu.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add useless-suppression to the disable there then. Because the other stuff in that comment still needs to be disabled.

@@ -1 +1,9 @@
bad-option-value:1:0:None:None::Bad option value for enable. Don't recognize message W04044.:UNDEFINED
bad-option-value:4:0:None:None::Bad option value for disable. Don't recognize message C05048.:UNDEFINED
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mind doing a follow up PR just before the other PR which changes the confidence for bad-option-value?

Please don't do it in this PR as it already quite large.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah sure, I already have a lot of cherry-pick to do for 2.14.1 anyway πŸ˜„

Copy link
Collaborator

Choose a reason for hiding this comment

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

πŸ˜…

All good fixes though πŸ˜„

@Pierre-Sassoulas Pierre-Sassoulas merged commit f388437 into pylint-dev:main Jun 4, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the refactor-deleted-messages branch June 4, 2022 09:13
@DanielNoord
Copy link
Collaborator

@Pierre-Sassoulas This breaks main. The pylint check didn't pass.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2022

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰This comment was generated for commit 19410c2

@Pierre-Sassoulas
Copy link
Member Author

This breaks main. The pylint check didn't pass.

Damn the spellcheck is fragile. It worked locally and in CI. I don't think we can do anything about this, enchant itself is fragile. Let me fix this.

@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 Jun 5, 2022
iamsaywhat added a commit to emlid/code-quality that referenced this pull request Jun 29, 2022
When using pylint v2.14, you can get a bunch of errors like:
/action/lib/.automation/.python-lint:1:0: E0015: Unrecognized option found: no-space-check (unrecognized-option)
/action/lib/.automation/.python-lint:1:0: R0022: Useless option value for '--disable', 'print-statement' was removed from pylint, see pylint-dev/pylint#4942. (useless-option-value)
/action/lib/.automation/.python-lint:1:0: R0022: Useless option value for '--disable', 'parameter-unpacking' was removed from pylint, see pylint-dev/pylint#4942. (useless-option-value)
/action/lib/.automation/.python-lint:1:0: R0022: Useless option value for '--disable', 'unpacking-in-except' was removed from pylint, see pylint-dev/pylint#4942. (useless-option-value)

Most of them have beed removed here:
pylint-dev/pylint#4942

But raising exceptions when using removed options was only added in 2.14 in
pylint-dev/pylint#6826

We still need to actualize this config with new options, but at least
we won't get errors with this config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants