-
Notifications
You must be signed in to change notification settings - Fork 511
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
Swap out flake8 in favor of Ruff #2438
Conversation
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Kudos, SonarCloud Quality Gate passed! |
There are a lot of changed files in this PR. Most are auto fixes from ruff. The auto fixes are all contained in 4f02300. I recommend looking at the other commits individually to see changes I actually made by hand (which is where the issues are likely to be if there are any). |
This is now ready for review. @swcurran @usingtechnology. Also @Gavinok since you recently worked with the pyproject.toml and dependencies, a check from you would be good, too. |
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.
looks good!
I am adding a follow up ticket to update the devcontainer documentation and sample tasks to use ruff. I don't think we need it in the PR and it will be quicker for me to take it on (not much effort really).
Resolves #2400.
This PR replaces flake8 with Ruff as suggested by @ff137. I've selected a "reasonable" set of selected and ignored error codes for now. I think we should add/no longer ignore more in the future.
One in particular that I think should have it's own issue raised over is C901 or cyclomatic complexity checks. By default, Ruff sets the threshold at 10. This is a pretty common threshold. There are 81 instances of ACA-Py exceeding that threshold. These are ignored for the time being as it's likely each instance will require individual attention.
I've also moved miscellaneous configuration for dev tools out of
setup.cfg
and translated them intopyproject.toml
. We'll need to make sure this meshes well with changes in #2436.