-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Keep consistent line endings #201
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…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
TomlDocument
as string still has inconsistent line endings. However, keeping consistent line endings forTomlDocument
seems to require way more effort since hard coded"\n"
is used in many places.