Skip to content

Conversation

@DhavalGojiya
Copy link
Member

Description

Add a pyproject.toml validator hook to pre-commit to ensure the file is valid before commits.

Test Code

pre-commit run validate-pyproject --all-files

Validate pyproject.toml..................................................Passed

@ulgens
Copy link
Member

ulgens commented Dec 4, 2025

@DhavalGojiya, asking out of curiosity, do you have a preference for this library over https://github.com/tox-dev/pyproject-fmt ? It's the time I saw the one in this PR and I'd like to learn about the differences.

@DhavalGojiya
Copy link
Member Author

DhavalGojiya commented Dec 4, 2025

@DhavalGojiya, asking out of curiosity, do you have a preference for this library over https://github.com/tox-dev/pyproject-fmt ? It's the time I saw the one in this PR and I'd like to learn about the differences.

The tool in the PR is a validator, while what you're referring to is a formatter.
I've tried adding this pyproject formatter that you refer here in some repositories, but most of the time maintainers don't like it. The reason is simple: this formatter messes with the [project.urls] section and sometimes with the dependency groups.

See
CC : @amirreza8002

@amirreza8002
Copy link
Member

hi
the pyproject-fmt project is highly opinionated
if you agree with their opinion, it should be good
i didn't, so i didn't add it

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 this pull request may close these issues.

3 participants