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
R1732(consider-using-with): Regression on contextlib.ExitStack #4654
Comments
Thank you for opening the issue, I agree with you you should not have a warning here. |
I will look into this. I was not aware of the |
Probably |
Thanks @cdce8p. |
Steps to reproduce
Using
exit_stack.enter_context()
within awith contextlib.ExitStack() as exit_stack
block, I think we shouldn't have anyR1732(consider-using-with)
errors. At least, no errors were raised underpylint==2.8.3
.Given a file
test.py
:Current behavior
Result of
pylint test.py
:Expected behavior
pylint --version output
The issue is the same with:
However, no issues with:
The text was updated successfully, but these errors were encountered: