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

Type add_message and add MessageLocationTuple #5050

Merged
merged 7 commits into from
Sep 21, 2021

Conversation

DanielNoord
Copy link
Collaborator

  • 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

This adds typing to add_message and adds a new NamedTuple to typing.py. I add a deprecation warning for Message, but I'm not sure if it is even necessary. Is Message part of the public API? If not I can remove it.

The type: ignore in tests/testutils/test_output_line.py will be fixed in a follow-up PR. OutputLine needs a little refactor to only accept int for column and line. This will bring it in line with all other code that references column or line, where those are also int.

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.

I like this change. But maybe the msgid/symbol typing is something that should be done prior to this one ?

pylint/message/message_handler_mix_in.py Outdated Show resolved Hide resolved
pylint/message/message.py Show resolved Hide resolved
pylint/message/message_handler_mix_in.py Show resolved Hide resolved
@DanielNoord DanielNoord added the Maintenance Discussion or action around maintaining pylint or the dev workflow label Sep 20, 2021
pylint/message/message.py Outdated Show resolved Hide resolved
pylint/message/message.py Outdated Show resolved Hide resolved
pylint/message/message.py Outdated Show resolved Hide resolved
pylint/message/message_handler_mix_in.py Show resolved Hide resolved
pylint/message/message_handler_mix_in.py Outdated Show resolved Hide resolved
pylint/typing.py Outdated Show resolved Hide resolved
tests/message/unittest_message.py Outdated Show resolved Hide resolved
pylint/message/message.py Show resolved Hide resolved
pylint/message/message_handler_mix_in.py Show resolved Hide resolved
pylint/message/message_handler_mix_in.py Outdated Show resolved Hide resolved
tests/testutils/test_output_line.py Show resolved Hide resolved
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Looks good to me. @Pierre-Sassoulas Would you mind taking another look?

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.

Thanks, you're almost single-handedly typing pylint :)

pylint/message/message_handler_mix_in.py Show resolved Hide resolved
pylint/checkers/base_checker.py Show resolved Hide resolved
pylint/message/message.py Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas merged commit 1e675ab into pylint-dev:main Sep 21, 2021
@DanielNoord DanielNoord deleted the typing-add-message branch October 2, 2021 21:08
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