-
Notifications
You must be signed in to change notification settings - Fork 26
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
Pre-commit: add Ruff #261
Pre-commit: add Ruff #261
Conversation
There are a few errors to fix in the code (or to add to the ignore, while it's not the ideal way):
|
Thanks for starting this, since a change on flake8 pre-commit is not passing, so why not add ruff in one go. I fixed the places where pre-commit was not passing, don't understand enough about the rest though, so someone else should approve or I will read later. |
I think this is good to go. Just a comment on why we ignore |
Thanks for the explanation! Can we document this in a comment? |
I think the problem with yaml formatting is fixed now. |
Good idea: I added it in 9bdfe5d |
I keep having problems with |
Ah and here i thought this was just me, after seeing you have the same issue, this seems to be a known problem: |
I could fix the YAML formating using the pull request fix they have. Instead of |
My memory didn't help me here: I already raised this problem last year. There were indeed a few users running the tutorial locally, and that means 99% of the times on Windows. |
Due to a bug on Windows, which makes it very fragile Check out: jumanjihouse/pre-commit-hook-yamlfmt#42
for more information, see https://pre-commit.ci
Okay, I found an alternative formatter that should work on Windows as well. Please, Windows people, double check. I know it's marginally relevant since most people will use Codespaces/Binder/whatever. |
Yaml format works for me now, but Yaml lint still fails. |
@despadam @Snowwpanda As discussed, I removed |
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.
Works as expected now, thanks!
Fixes #255
pyproject.toml
instead of multiple files (pytest.ini
,flake8
).