Closed neffmallon closed 6 years ago
Black, by default, makes sure there is a new line to the end of whatever it is formating, which means all the cells have a new line at the end of them. There are good reasons for this with python files, but those good reasons don't track with iPython notebooks. I've filed an issue with that repository, but they might reject it. At any rate, I've changed my local version, so I can remove all those newlines for you if you wish.
I often include a file like this: https://github.com/Mitchellpkt/OperatorAware/blob/master/IgnoreThese.gitignore
Then my setup script includes cp IgnoreThese.gitignore .gitignore
Having a .gitignore included in the repository allows users to include things like private credentials and have them not be uploaded. It also allows your developers to, say, make generate and save figures and be able to use git add .
but not track what you don't actually want in the repository. But also, the blackening is probably out of date anyway. This pull request should probably be closed.
I'll try the blackening next time I take a trip to Jupyter. Thanks for bringing it to my attention, @neffmallon
Added .gitignore (allows you to have files that are not tracked by git when you add files).
Also used https://github.com/csurfer/blackcellmagic to lint your code. (see https://github.com/ambv/black for more info)