-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Enable Even More PyDocStyle Checks #40567
Comments
I included D107 in the list because it was part of the original plan in #10742, but I'd like to argue for dropping it. I don't feel that a docstring in every |
Hi Ferruzzi, Can I take up this issue? |
Feel Free. |
Please do! You don't even need to take the whole thing. In fact, this is much easier to do in small chunks. Fix all the D100 changes in one area, submit the PR, fix another area, submit that pr, etc. then move on to D102 and start over, etc. Small PRs are easier for folks to review and more likely to get merged quickly. This could (should?) easily be a team project for a bunch of people, just take bites out of it when and where you can. Feel free to hit me up on Slack if you need a hand getting started. |
You know what, I'm just going to make the call and drop D107 off this list. If someone wants to do it, they are welcome to but I won't consider it a requirement to close this project. 👍 |
After some discussion on the mailing list it looks like D102 and D103 are minimal benefit, but we do have a few others we'd like to enable and a couple that are still being discussed. I'll update the original description with details. |
I can make a PR for:
|
Update: I believe |
Same with |
Looks like you are correct, I'll check them off on the list here. Can you submit a PR with those two removed from the ignore list so they are enabled, please? |
Description
Followup to #10742
We use Ruff to enforce docsting style
airflow/pyproject.toml
Lines 47 to 74 in 23b8e83
We follow pep257 style (http://www.pydocstyle.org/en/stable/error_codes.html) for checks.
Currently, we ignore the following rules and should work towards enabling them:
Missing Docstrings
__init__
https://lists.apache.org/thread/lcvocwxnrrzq9ofrg4b4hj0yvpzbnygfIt would be good if we can enable them one by one -- separate PRs are ok
Rough process to fix these
Set up your dev environment [docs]
0.5. Go to your
airflow
directory and runruff check
. Write down the number of failures. Mine currently says 8. This step is just to make sure it's working and give you a baseline.Open
/airflow/pyproject.toml
In the
ignore
list (currently starting on line 301) comment out the rule you intend to work onIn a terminal, go to the
airflow
directory and runruff check
again. It should now fail with WAY more errors. Mine currently says 863. If the number didn't go way up, something is wrong with your setup.Have a quick scroll through that list, paying attention to which ones failed because of the rule you just enabled.
Come up with a rough plan to break that down into bites. Maybe pick one directory that has a bunch of failures and start fixing there.
After you have a handful of fixes done: remove your comment (so it is ignored again) and submit a PR with that chunk of changes (see the Contributing docs in step 0)
PLEASE submit these in many small PRs. If you do it all at once it will turn into a 3000-line PR and nobody will review it. Eventually, on the last chunk you'll just remove that line from the ignore list entirely when there are no more violations to fix.
Let me know if you need any help, or ask in the Slack server.
The text was updated successfully, but these errors were encountered: