-
Notifications
You must be signed in to change notification settings - Fork 21
Simplify ruff config, drop black, and update pre-commit #117
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
|
@guiwitz another one for you to review :) |
brisvag
left a comment
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.
Same as we did in napari/napari, I suggest to use single quote and not double quote as default. It's one less keystroke (so more commonly used and leads to smaller changes from the formatter), and less visually noisy.
Thanks for greatly encouraging this! I meant to do such, but when I was doing So I opted to add I've updated the description with this new info. |
Czaki
left a comment
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.
Please also update template/pyproject.toml.jinja then you will need to copy this changes https://github.com/napari/napari-plugin-template/pull/124/files#diff-35e54f0879a33f83222b35a59507b6a8b3409371455aa67530a06b75aadcc79d
We need to find way to force sync between template pre-comit and repository pre-commit
Co-authored-by: Grzegorz Bokota <[email protected]>
template/{% if install_precommit %}.pre-commit-config.yaml{% endif %}.jinja
Outdated
Show resolved
Hide resolved
…ndif %}.jinja Co-authored-by: Grzegorz Bokota <[email protected]>
Czaki
left a comment
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.
Ok. I see that I do not update _tasks.py so I need to make other changes in files to pass pre-commit checks.
Description
Driven mostly by curiosity and the desire for simplification, this slims down formatting/linting config for the template:
It drops black as a formatter and just uses ruff for everything. To take care of the template,
ruff.tomlhas been added. Both pre-commits have been updated to use ruff as well.Other changed files have just been hit with
ruff format/ruff checkor were manually update to pass pre-commit checks (in cases where .py.jinja contain jinja syntax, ruff is unable to work). So now the root and template python files are formatted as expected(I also added cancel concurrency because tests were taking even longer to run...)