-
Notifications
You must be signed in to change notification settings - Fork 5
Add precommit hooks & some linting #18
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
Conversation
|
(comment from the sidelines, feel free to ignore!) are you planning to support uv? If so, I highly recommend It also plays nicely with Pixi, which may be of interest for other reasons: https://github.com/prefix-dev/pixi/blob/main/lefthook.yaml. |
|
Thanks for chiming in @lucascolley! Comments from the sidelines are very welcome, and I'm hoping we can eventually get
What do you mean by "support uv"? Using uv/uvx should generally just work, right, since it can get info from pyproject.toml? Should we have a I'm not an expert in This is also the first I've heard of |
|
Yes, I think shipping a I'm not sure what the best practice is for uv lockfile updates, but for Pixi we can use renovate: https://github.com/data-apis/array-api-extra/blob/main/renovate.json. |
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.
Thanks for all of this cleanup! Two small things that don't matter, let's get it in :).
"You are a monster!", and the style checks even hate my two spaces after a full stop ;)!1!
(To be clear, I am happy with just using these strict style fixes, it's not like I have to agree to prefer every change :).)
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
Thanks @seberg! I got your suggestions in. I also don't mind having two spaces after a period like you like to do (even though that's so 10 years ago :-P) and am generally not a stickler for formatting, but I do like using tools to automate things even when I don't 100% agree with 'em. Just wait until Also, fyi my preference for max line length is between 88 and 100 characters. Thanks all for being flexible and wanting to move forward. If anybody has a work setup where they prefer shorter line lengths, we can adjust it. Thanks for clarifying @lucascolley. Let's get Squash merging. |
I added some pre-commit hooks to get us closer to releasing (and for general quality assurance).
I may have gone a little overboard.
@seberg, @Schefflera-Arboricola, please don't be afraid to make changes to these pre-commit hooks and configurations, especially config for ruff. My rationale is that it's easier to begin with linting tools for a new project than it is to add linting rules to old projects, so might as well try many to see what's useful. Any others you'd like to try (or avoid)?
I made changes incrementally so that each addition may be checked commit by commit.
I also ran
sp-repo-reviewto find recommendations and looked at https://github.com/scientific-python/cookie (but not exhaustively).