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

Add pyproject fmt #1267

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add pyproject fmt #1267

wants to merge 7 commits into from

Conversation

ocefpaf
Copy link
Collaborator

@ocefpaf ocefpaf commented Jul 10, 2023

This should prevent a regression in #1265 and complements @mwtoews #1266.

Note that the use of pre-commits has a learning curve and while I would advocate to a even heavier use than just this one, I'm OK if this PR is closed in case folks don't want to go there. However, if you do, one can set it up locally and run pre-commit or use the pre-commit hook. Additionally one can enable pre-commit-ci and use the pre-commit.ci autofix comment in the PR to fix it automatically. Enabling pre-commit-ci has the advantages of having this as a CI check and get the auto-updates for the hooks in the .pre-commit.yaml file.

@ocefpaf ocefpaf marked this pull request as draft July 10, 2023 16:39
@ocefpaf
Copy link
Collaborator Author

ocefpaf commented Jul 10, 2023

Interesting, it broke what it was supposed to fix, the pyproject.toml! I'll try to figure out what is happening...

@ocefpaf
Copy link
Collaborator Author

ocefpaf commented Jul 11, 2023

Found the problem and it may be a bug in the linter. xref.: tox-dev/pyproject-fmt#110

@ocefpaf
Copy link
Collaborator Author

ocefpaf commented Jul 11, 2023

There is an opendap sever failure now that is unrelated.

@ocefpaf ocefpaf marked this pull request as ready for review October 19, 2023 23:04
@ocefpaf
Copy link
Collaborator Author

ocefpaf commented Oct 22, 2023

This one is ready for review.

@mwtoews
Copy link
Contributor

mwtoews commented Oct 23, 2023

I've been increasing my use of pre-commit (+ .ci) lately, but I've not heard of pyproject-fmt until now. I'm unsure about it's inconsistency, however. For example, some sections have a 1-line space between and others don't, some have sorted keys, others don't. Some local tests that I tried with this branch, where I've re-arranged some items in the pyproject file will yield bad formats too, so I can't grasp what the tool is trying to do.

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.

2 participants