Open jamesbraza opened 1 year ago
Why is the adjustment necessary / better?
When not referencing the return of open, context management isn't necessary.
open
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")
Desired change
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: