-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
[Bug]: Missing FURB151 (Path(x).touch()
) when separating open() and close()
#326
Labels
bug
Something isn't working
Comments
(edited) Thank you for looking into it. I just wanted to throw an idea in the air, but I don't know if this is a common idiom in real-world code. I saw it in a student homework, which touches the file and then reads it.
This example could be refactored to not touch:
but as the warning is already implemented, I thought it just needs to be extended. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Has your issue already been fixed?
master
branch? See the docs for instructions on how to setup a local build of Refurb.The Bug
The following code:
Does not emit the Path.touch() warning for lines 8-9. It only warns for line 12.
Version Info
Python Version
Python 3.11.7
Config File
# N/A
Extra Info
None
The text was updated successfully, but these errors were encountered: