Skip to content

Make the scope of PyLinter messages explicit #6537

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

Merged
merged 1 commit into from
May 7, 2022

Conversation

DanielNoord
Copy link
Collaborator

@DanielNoord DanielNoord commented May 7, 2022

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Write a good description on what the PR does.

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Description

Ref. #3312 (comment)

In preparation of moving PyLinter to BaseChecker instead of BaseTokenChecker we need to make the scope of its messages explicit. For TokenChecker it is LINE by default.

Even if my proposed move to a _MessageStateHandler isn't accepted, this PR might be worth considering as it doesn't hurt making this explicit.

@DanielNoord DanielNoord added the Maintenance Discussion or action around maintaining pylint or the dev workflow label May 7, 2022
@DanielNoord DanielNoord added this to the 2.14.0 milestone May 7, 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.

LGTM !

Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

Great, as I understand it, this avoids having to do isinstance(PyLinter) in create_message_definition_from_tuple() which would introduce a circular import. πŸ‘πŸ»

@jacobtylerwalls jacobtylerwalls merged commit 88ad209 into pylint-dev:main May 7, 2022
@DanielNoord DanielNoord deleted the bad-option-value branch May 8, 2022 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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