-
Notifications
You must be signed in to change notification settings - Fork 192
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
CI: Update pre-commit hooks #6367
Conversation
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 @danielhollas
remove flynt linter, according to astral-sh/ruff#2102, most of it is already implemented in ruff, with the exception of FLY001 (consider replacing string concatenation with f-string).
I would like to have just ruff
, but until it completely replaces it, let's keep flynt
for the time being. Also, as a sidenote, I think you should have enabled its rules explicitly in the pyproject.toml
. Don't think they are enabled by default
run pre-commit autoupdate
Don't think you have done this. But just as well. I removed it at some point because I found it obnoxious. A lot of updates where often nothing was changed. I just manually updated it once before each release. Works fine.
d3f8d74
to
f46cca2
Compare
Ah, you're right. I tried enabling FLY002 and running with - user_input = '\n'.join(
- ['yes', aiida_localhost.label, label, label_unique, 'd', 'core.arithmetic.add', '/bin/bash', 'y']
- )
+ user_input = f'yes\n{aiida_localhost.label}\n{label}\n{label_unique}\nd\ncore.arithmetic.add\n/bin/bash\ny' btw: Also tried enabling UP fixes and that resulted in a lot of churn, so we couldn't enable it easily anyway.
Nah-uh, I did! 😛 I meant to use the past tense, what I meant is I ran it manually. ci:
autofix_prs: true
autoupdate_commit_msg: 'Devops: Update pre-commit dependencies'
autoupdate_schedule: quarterly
skip: [mypy, dm-generate-all, dependencies, verdi-autodocs] Well, the remnants of this PR are a bit sad, up to you if you still want to merge this. Sorry for the churn. |
Ah yeah, that is only because I don't think it allows to turn off entirely. And still wanted to keep the functionality of it running pre-commit on PRs, just because some contributors don't have it enabled locally.
I will keep it and merge it. As mentioned, I was anyway going to do this soon for the upcoming release, and ruff 0.4.0 comes with further performance improvements |
A smattering of small updates to pre-commit hooks and pre-commit workflow in
ci-style.yml
(partly overlapping with #6368)
ran
pre-commit autoupdate
remove flynt linter, according to this ruff issue, most of it is already implemented in ruff, with the exception of FLY001 (consider replacing string concatenation with f-string).
If this is deemed important enough I can revert this change.