Skip to content

Refactor _collect_block_lines #6560

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 3 commits into from
May 9, 2022

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

Ref. #6556.

Main difference is that we now get the message definitions before calling/doing _set_message_state_in_block. It's a little cleaner and separates some functionality. _collect_block_lines becomes a bit pointless though.

@DanielNoord DanielNoord added the Maintenance Discussion or action around maintaining pylint or the dev workflow label May 9, 2022
@DanielNoord DanielNoord added this to the 2.14.0 milestone May 9, 2022
@coveralls
Copy link

coveralls commented May 9, 2022

Pull Request Test Coverage Report for Build 2294120969

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

Totals Coverage Status
Change from base Build 2293638576: 0.0003%
Covered Lines: 16017
Relevant Lines: 16799

πŸ’› - Coveralls

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, nice new function.

"""Set the state of a message in a block of lines."""
first = node.fromlineno
last = node.tolineno
for lineno, state in list(lines.items()):
Copy link
Member

Choose a reason for hiding this comment

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

Is the call to list necessary ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That would be a nice lint warning πŸ˜„

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, it necessary...

Copy link
Member

Choose a reason for hiding this comment

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

It looked like an artifact from a 2to3 migration, my bad :)

@DanielNoord DanielNoord merged commit d3c7632 into pylint-dev:main May 9, 2022
@DanielNoord DanielNoord deleted the bad-option-value-5 branch May 9, 2022 12:43
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