Keep consistent line endings#201
Conversation
…s default for new files
|
Hmm, that does break the integration tests, please have a look? @radoering |
|
@frostming poetry tests were kind of unintentionally expecting inconsistent line endings... They should be forward compatible now. Please re-run the failing tests. |
…s default for new files (python-poetry#201)
Is it possible to add a configuration setting for this? I am using Poetry, and it is rather tedious that Poetry automatically generates files using |
You are free not to use the |
Resolves: #200
With this change, when reading a toml file with consistent line endings, changing the content and writing the content into a file, the result is a file with the same consistent line endings as the input file.
Further, default line endings for Windows when creating a new toml file will be Windows line endings (
"\r\n") again.This change is not perfect, because it only ensures that the written file has consistent line endings. Dumping the changed
TomlDocumentas string still has inconsistent line endings. However, keeping consistent line endings forTomlDocumentseems to require way more effort since hard coded"\n"is used in many places.