-
Notifications
You must be signed in to change notification settings - Fork 32
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
using context managers to write files #120
Conversation
@shimwell Yes, I can review by next Monday 6th. |
Hi @shimwell . Thank you for the development, which is generally fine for me.
|
Thanks alberto I shall get this branch merge compatible with dev and get started on your recommendations. Much appreciated |
@alberto743 I've done 4 out of the 5 suggestions. I'm just holding back on the first suggestion regarding |
Not done yet but would like to fix this in a follow up PR.
Done
Done as a
Done as a
Done by removing old python 2.7 code |
Fully agree! |
closing and replacing with PR #160 as I accidently made some commits to this branch and messed it up |
This PR changes the write statements to use context managers. This removes the need for a
.close()
when the file writing is done.Context managers do however require another indentation which means the lines are shorter for the code below. The formatter has therefore decided that there is a more optimal layout for these lines, now that they have less space to stay below the line limit. So we have a bigger diff than might be expected when starting the PR
Requested in issue #111
closes #111
@alberto743 are you ale to review
tests passing locally