-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 pre-commit hooks #9840
Conversation
93adae7
to
a72decf
Compare
a72decf was because taplo defaults to See formatter options for more. Keeping with the default due to the smaller diff |
I'm up for merging ... unless we decide to go with prettier, which covers all of these. I've had a good experience with prettier, because it's a single file manages the formatting for all these formats where we only have a few files. A long track record over at PRQL. But no particularly strong preference... |
We already have prettier in precommit, and prettier doesn't support TOML (https://prettier.io/docs/en/). Unless you mean via a prettier plugin like https://www.npmjs.com/package/prettier-plugin-toml, but that is just a wrapper for taplo |
👍 for |
Ah, thanks, definitely +1 to this, then |
Done (using a suggested config in their readme) |
@@ -327,7 +336,9 @@ filterwarnings = [ | |||
"default:the `pandas.MultiIndex` object:FutureWarning:xarray.tests.test_variable", | |||
"default:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning", | |||
"default:Duplicate dimension names present:UserWarning:xarray.namedarray.core", | |||
"default:::xarray.tests.test_strategies", # TODO: remove once we know how to deal with a changed signature in protocols | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know that empty lines are allowed, nice.
Thanks @VeckoTheGecko ! |
Changes:
validate-pyproject
hookHeyo! Looks like Taplo (https://github.com/tamasfe/taplo) would be a good option (same project as VScode extension Even Better TOML with 2.3M downloads) . They don't have an official hook (tamasfe/taplo#535) but there's an unofficial one at https://github.com/ComPWA/taplo-pre-commit. I don't think they'll get an official one soon as they would need to set up a mirror repo (and best to transfer both repos to an org for that).