SIM115 false positive on functions that return file handler objects #13862
Labels
bug
Something isn't working
help wanted
Contributions especially welcome
rule
Implementing or modifying a lint rule
ruff 0.7 gives a false positive for SIM115 on something like:
which can be resolved like:
But this prevents the calling function from being able to work with
f
because the context manager has closed it. It seems that SIM115 should not trigger when returning a file handler object from a function?The text was updated successfully, but these errors were encountered: