Closed Saransh-cpp closed 5 months ago
Pull request fixing this is definitely welcome! 😎
Will try to open a PR this weekend!
Yeah, also have seen this for license files being not captured The Way It Expects.
It seems like an invariant of this tool should be that before and after should always be parsed to exactly the same effective data. Old json.dumps(sort_keys=True)
isn't quite enough, due to custom ordering of arrays.
Irrespective of how that worked, perhaps a --safe
flag would work (or perhaps default into such a check, and expose --unsafe
).
Please check with https://github.com/tox-dev/pyproject-fmt/releases/tag/2.0.0 and report if still a problem.
Formatting the following file with
pyproject-fmt
causes the build to fail, and I am guessing the root cause is the misplaced[[project.authors]]
section.This can be fixed manually by the users, but it definitely is a bug.
Original file
(https://github.com/scikit-hep/vector/blob/cac88a2e0f1c4bf7bceaafbea6e234b3147e3ca3/pyproject.toml) Installs the package correctly -
Formatted file
Does not build -
pyproject-fmt output
pip error