Closed cschlaak closed 10 months ago
We probably need to set up the configuration to enforce a format and not preserve existing and add new ones using a different kind.
Morning @cschlaak ,
Wondering if I could get some feedback on @alonbl 's proposed implementation in #1012 . I like the idea of using the os default, but being able to override it.
If you do approve, would you be okay with closing this pull request after #1012 has been merged to master? Or would this pull request automatically close if #1012 is merged? Not sure of the best way to handle this situation.
Thanks,
--Jeremy
Hi Jeremy, I agree. I think it's better to have the option to override the default os.sep . Thanks for closing the request and for your efforts you put into this project. Best Christof
Prevent Python from replacing the existing newline characters. From the documentation: "... If newline is '' or '\n', no translation takes place ..."
Description My code base is based on unix line endings '\n'. When running VSG on Windows every file is rewritten with windows line endings '\r\n'. This is due to pythons implementation of 'open'. The added newline argument prevents python from replacing the existing line endings.