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 newlines in config files #98
Conversation
Build failed with a temporary network issue:
Will rebuild |
a209430
to
b3fe349
Compare
Nice, thank you so much |
We also have to take care not to change the newline style of the file. I think that currently this PR will produce a weird result for Linux users who use Same goes for Windows users who have only See merge request #59 which tries to keep the line endings consistent. I think it would make sense to add a test like |
…f the right type at the end of the config
Thanks for the suggestion, have updated the tests to explicitly check the final line ending occurs once (not twice) and is of the right type. Also confirmed locally that
The code is currently making use of Python's universal newline conversion handling when using
Excerpt from the docs: https://docs.python.org/3/library/functions.html#open
|
Look good to me! I'm in favor of merging this. |
@ekohl Can you look into this one too? |
Thanks |
* Fix newlines in config files * Update tests which previously expected two blank lines, now expect only one * Update test_retain_newline to explicitly check for a single newline of the right type at the end of the config
This change should still be sufficient to close #58.
Heavily inspired by the previous patches and PR jtrakk#1, however it appears the original PR wasn't merged in upstream?