-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
rule for ValueError: I/O operation on closed file. #10517
Comments
Do you think the rule could be generalized to disallow method calls on any object defined in a context expression after the |
@MichaReiser no, you can safely use many objects after their context is exited :) we'd need type-inference for that to be broadly correct. |
For example with |
We would probably need to make this specific to |
https://github.com/wemake-services/wemake-python-styleguide?tab=readme-ov-file finds this flake8 --select WPS441 somefile.py |
ruff does not complain about:
but python does:
The text was updated successfully, but these errors were encountered: