Desired change
- Rule(s): SIM115
- Adjustment: should not be triggered when not referencing the return
Explanation
Why is the adjustment necessary / better?
When not referencing the return of open, context management isn't necessary.
Example
This is an example where the mentioned rule(s) would currently be suboptimal:
# Not referencing the return, simply just creating an empty file
open(path, mode="w")