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

Not having an empty newline at the end makes the file corrupt itself after dumping #97

Closed
xNinjaKittyx opened this issue May 3, 2020 · 1 comment · Fixed by #122
Closed

Comments

@xNinjaKittyx
Copy link

xNinjaKittyx commented May 3, 2020

Gist:https://gist.github.com/xNinjaKittyx/1680e3159026089986df98a62eec02cc

Initially thought it was a poetry bug, but I went ahead and checked the parser using this

import tomlkit
print(tomlkit.dumps(tomlkit.loads(open('pyproject.toml').read())))

with the gist saved as pyproject.toml in the local folder.
It will end up corrupting itself (as shown in the comment of the gist).

I have tested using pypoetry's version 0.5.11 as well as 0.6.0 from pypi

@frostming
Copy link
Contributor

I've created a fork of tomlkit v0.7.0 with the issue fixed, try it:

GitHub: https://github.com/frostming/atoml
PyPI: https://pypi.org/project/atoml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants