Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Replace flake8, isort, and pyupgrade with ruff #584
pre-commit: Replace flake8, isort, and pyupgrade with ruff #584
Changes from 1 commit
4200898
430f0c8
469085c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Shouldn't this be
extend-select
instead?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.
https://beta.ruff.rs/docs/configuration
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.
Well all I want is to not hardcode a ruleset (which
select = [stuff]
exactly is). I don't think any of those recommendations are worth considering blindly given the tool's age and popularity.How about
select = ["ALL"]
and ignore whatever doesn't make sense for pytest-cov?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.
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.
There are way too many categories to enable manually. I'd expect that there are more good checks than broken or bad ones.
I noticed it's aggressive ... or rather destructive. That's why I think
--show-fixes
is a must. I think avoiding--fix
actually adds more friction (too much back and forth for avoidable manual stuff).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 so I've played with it a bit more.... now I am not really sure what the best way... eg: these are either invalid checks or would be a pain to sort out, or not even worth fixing:
Now considering that rsync features are being dropped in xdist ... a lot of bulk using that in pytest-cov becomes unnecessary, if it isn't already as some people are suggesting pytest-cov is not necessary for getting xdist support...
I guess select with a few is fine for now.
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.
So... How should we proceed? Given your explorations and your knowledge of the codebase, do you want to open a new PR that cherry-picks from this one? I have no trouble closing this with unmerged commits. Or should I press on?
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.
I'd also recommend the
C4
checks as they are popular, increase performance, and have autofixes enabled for all rules.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.
Is there somewhere proof that C4 mods increase performance?