-
Notifications
You must be signed in to change notification settings - Fork 91
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
Use ruff instead of black, isort, flake8, autoflake, pyupgrade #219
Conversation
2c13e05
to
fa48a1d
Compare
Here is an example of what this PR does: OCA/mis-builder#577 I would not enable this by default on existing branches but I think it's ok for 17.0. What do people think? |
OK, let's go with it by default in v17. |
copier.yml
Outdated
@@ -126,6 +126,18 @@ generate_requirements_txt: | |||
Generate requirements.txt from addons manifests and optional overrides in setup.py | |||
files. | |||
|
|||
use_ruff: | |||
default: no |
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.
Since this requires a manual template upgrade and ruff is a better default, I think we should enable it by default.
default: no | |
default: yes |
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.
Would that not enable ruff by default when we apply the template on existing repos?
I have handled the review comments and replied to some. @yajo can you update your review? |
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!
…ns-repo-template#219 - raise error because files are not exists
…ns-repo-template#219 - raise error because files are not exists
…-addons-repo-template - because into oca-addons-repo-template now use ruff and this files are delete on commit, see PR OCA/oca-addons-repo-template#219 OCA/oca-addons-repo-template@299cb36
…-addons-repo-template - because into oca-addons-repo-template now use ruff and this files are delete on commit, see PR OCA/oca-addons-repo-template#219 OCA/oca-addons-repo-template@299cb36
…-addons-repo-template - because into oca-addons-repo-template now use ruff and this files are delete on commit, see PR OCA/oca-addons-repo-template#219 OCA/oca-addons-repo-template@299cb36
…-addons-repo-template - because into oca-addons-repo-template now use ruff and this files are delete on commit, see PR OCA/oca-addons-repo-template#219 OCA/oca-addons-repo-template@299cb36
From the docs: An extremely fast Python linter and code formatter, written in Rust..
The goal is multiple
I tried to configure rules that are compatible with the current flake8 and isort config.
To test this on a repo, run
pipx run copier copy git+https://github.com/acsone/oca-addons-repo-template --vcs-ref=use-ruff --trust .
and answer
yes
to the "use ruff" question.