pico-project-generator
pico-project-generator copied to clipboard
Code Cleanup
Hey there,
Just started using this. I noticed that files writes were not using a contextmanager and then fell down the rabbit hole of cleaning up some other things. Nothing should be a functional change and the with open(...) as ...
will prevent any dangling filehandlers should an issue happen.
Each commit should be self contained to the issue it addresses for review instead of seeing a huge amount of thrash.
Ignoring whitespace in the compare is also helpful to cut down on the noise. :)
Cheers! Thanks for an awesome project!
Can you post the functional changes as a separate PR please. Also, I disagree with some of the whitespace changes, there was formatting in there for a reason. Hence separating from the functional changes.
Done. New PR opened (#33)
As for the purposeful whitespace formatting, I see https://github.com/raspberrypi/pico-project-generator/blob/3a1cdad69a2218549547af2f31600b000930ab27/pico_project.py#L47-L62 Are there any other places were whitespace has purpose/meaning that were overwritten?
I'll have to check again, that was the obvious example.
Has this been superseded by #39 ?