-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Re-enable several disabled ruff rules #10196
Comments
I'd like to work on rule RUF100 - Remove redundant noqa directives throughout the codebase. |
@drona-gyawali go for it. I put your name next to that one |
I would like to work on rule B007 - Loop control variable {name} not used within loop body. |
Please select a rule from the list in this issue @techy4shri |
PT004 has been removed, only documentation is available. |
@techy4shri go for it! Your name is on the list now! |
@RayBB I would like to work on PLR5501 and RSE102 |
This reverts commit faf6297.
This reverts commit 0e51e9c.
@ananyakaligal put you down for PLR5501 as it's one at a time per the issue. |
I have raised a PR for the previous rule assigned to me. Next I would like to work on PLC1901 - String type comparison rule can be enabled without modifications. |
Hey @RayBB , with your permission, can I try working on PT006 - Standardize pytest parameter naming. |
@drona-gyawali yes go for it. I added your name |
@RayBB I would like to work on PLW0602 - Audit and remove unneeded global keyword (13 occurrences) please! |
@techy4shri you're marked as working on it now. This one may be a bit tricker. Please ensure you review each instance carefully and test that nothing is broken by changing it. |
I will keep that in mind, thank you! |
@drona-gyawali that's a good point. We can't enable the rule until all of the parts are removed. So yes we'll save that for the last task. |
@RayBB i would like to take up the task 1 of RUF012 |
I would like to work on PLC1901 - String type comparison rule can be enabled without modifications @RayBB . |
@ananyakaligal @techy4shri you're each assigned to the issues you asked for :) |
Proposal for dividing SIM115:
if you agree in the division, I would like to starts with the canges within "scripts" folder |
@geroferrari great job with the division. This is perfect. You're assigned 👍 |
Hey @RayBB, I 'd like to work on RUF012 Task - 3 |
I would like to work on SIM115 - Implement context managers for safer file handling (46 occurrences) subtask openlibrary/i18n/.. --> 8 occurrences . |
@drona-gyawali @techy4shri I updated the list with your names for those issues. |
I am open/willing to continue adding the context manager on the following folders (SIM115), |
@geroferrari go for it and I'll ask your name next to it later :) |
@RayBB Can I work on SIM115 - Implement context managers for safer file handling --> openlibrary/coverstore/.. --> 14 occurrences |
Hey @RayBB , I would like to work on [ SIM115 ] openlibrary/ --> 16 final occurrences (save this for last and enable the ruff rule) |
@ananyakaligal @drona-gyawali I've updated the issue with all your PRs and new assignment. |
Proposal
Today I went through all the ruff rules we manually disabled here and found several rules that likely should be re-enabled to improve the codebase.
To understand any of the above rules better search for them on https://docs.astral.sh/ruff/
Want to contribute to this epic? 🏃 Let's improve our code quality together!
Step-by-Step Guide for Contributors
Pick a Rule to Work On
Understand the Rule
Claim Your Rule
Make the Changes
pre-commit run --all-files
to see what needs to be fixedSubmit Your Changes
Part of #XXX
instead ofCloses #XXX
so when your PR is merged it doesn't close this issue.Need Help?
Remember: The goal is to improve code quality. Take your time to understand and fix the issues properly.
Justification
Ruff has great defaults. Back when we first enabled it we chose the path of least resistance and disabled rules that weren't easy to fix right away. As we have been improving the quality of our dev tooling, re-enabling some of these rules would be great.
Breakdown
Requirements Checklist
Major Implementation (Significant Code Changes):
global
keyword (13 occurrences) | @techy4shriRequires Discussion (Staff Needed), do not ask to be assigned:
Completed
Spoiler
Immediate Implementation (No Code Changes Required, just remove the rule):
Minor Implementation (Simple Code Changes):
# noqa
comments #10202Stakeholders
Instructions for Contributors
Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
The text was updated successfully, but these errors were encountered: