-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Unexpected pyproject.toml changes after poetry install #204
Comments
Hi! Unfortunately, we're at the mercy of
There was another formatting issue related to Poetry v2 here: #203 . I'm open to suggestions, but not sure how much we can really do. |
@mtkennerly could this particular problem be addressed by saving and then restoring the full
and poetry-dynamic-versioning/poetry_dynamic_versioning/__init__.py Lines 728 to 730 in 47d6f20
? |
Hi, Edit: Though something like @edgarrmondragon's solution looks like it would work to me for the basic vs literal string aspect. Though I don't think you need to save and restore the whole array, just save and restore the actual "version" string. That way it stays as a tomlkit.items.String object which keeps its |
@jonyscathe on local testing the approach seems to work so I'll just open a PR |
Hi,
I understand that the way poetry-dynamic-versioning works is that it edits the pyproject.toml file at the start of a poetry install and then edits it again at the end.
I was wondering if there is some way to preserve formatting a bit better than is done currently.
Where I work our standard use of toml is to use literal strings where possible, and to use a spacing of 2.
We don't really mind that poetry-dynamic-versioning changes our version from
'0.0.0'
to"0.0.0"
. Really doesn't matter that the version isn't a literal string.But now with the poetry v2 changes we are having:
change to
With the notable change being from 2 spaces to 4. This then causes our toml file linting to fail, causes us CI issues.
Obviously there are some fairly easy ways that we can fix this, but it wold be nice if this tool didn't make formatting changes to our file.
The text was updated successfully, but these errors were encountered: