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

Missing trailing newline #36

Closed
cthoyt opened this issue Sep 11, 2016 · 1 comment
Closed

Missing trailing newline #36

cthoyt opened this issue Sep 11, 2016 · 1 comment

Comments

@cthoyt
Copy link

cthoyt commented Sep 11, 2016

Line 170 of nbstripout.py reads as f.write('\n*.ipynb filter=nbstripout'). With the context manager on line 169, this appends the filter to .gitattributes without a trailing new line character.

This might be a matter of opinion, but it would be nice to have a trailing new character, especially because this line is being appended to the end of the file. Also, since the script includes from __future__ import print_function, this line could be rewritten as print('\n*.ipynb filter=nbstripout', file=f) to accomplish this.

@kynan kynan added this to the 0.2.8 milestone Sep 19, 2016
@kynan kynan self-assigned this Sep 19, 2016
@kynan
Copy link
Owner

kynan commented Sep 19, 2016

Good suggestion, I'll implement that!

@kynan kynan closed this as completed in 99dccbe Sep 19, 2016
ooiM added a commit to ooiM/nbstripout that referenced this issue Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants