Skip to content
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

Fix/preserve newline at end of notebooks #5

Merged

Conversation

Rjdrenth
Copy link

By default Jupyter notebooks are stored with a newline at the end of the file. Furthermore, not including a newline will cause the pre-commit hook 'end-of-file-fixer' to fail and add a newline. This triggers a never-ending loop of fails.

This fix will ensure that any adjusted notebook does include a newline at the end of the file, preserving original behaviour when Jupyter saves a notebook and reducing interference with other pre-commit hooks.

roy-ht and others added 7 commits September 6, 2020 08:03
By default notebooks are stored with a newline at the end of the file. Furthermore, not including a newline will cause the pre-commit hook 'end-of-file-fixer' to fail and add a newline. This triggers a never-ending loop of fails. 
This fix will ensure that any adjusted notebook does include a newline at the end of the file, preserving original behaviour and reducing interference with other pre-commit hooks.
In the sample config, update repository, version number and comment out bad default
@roy-ht
Copy link
Owner

roy-ht commented Mar 17, 2021

Thanks for your contribution!!!

@roy-ht roy-ht merged commit 94ef272 into roy-ht:master Mar 17, 2021
@roy-ht
Copy link
Owner

roy-ht commented Mar 17, 2021

@Rjdrenth Appreciate if you could check #6, thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants