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

Suppress consider-using-with on return statements #4851

Merged
merged 1 commit into from Aug 15, 2021

Conversation

DudeNr33
Copy link
Collaborator

  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature, or an important bug fix, add a What's New entry in
    doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

As discussed in #4748 the consider-using-with check should be suppressed on return statements.

The new proposal for consider-using-context-manager is not included in this MR. I think we should discuss the use cases where this message should - and especially should not - trigger before starting the implementation.

Closes #4748

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1133028673

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

Totals Coverage Status
Change from base Build 1132425686: 0.004%
Covered Lines: 13393
Relevant Lines: 14445

πŸ’› - Coveralls

@DudeNr33 DudeNr33 marked this pull request as ready for review August 15, 2021 16:35
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 agree with you, let's first remove the "false positive" before adding another check.

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Aug 15, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.10.0 milestone Aug 15, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit cd8af0d into pylint-dev:main Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False-positive consider-using-with when returning a file handler
3 participants