-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add D400 pydocstyle check #31135
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
Add D400 pydocstyle check #31135
Conversation
ashb
left a comment
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.
Not every instance of the change is correct
airflow/migrations/versions/0046_1_10_5_change_datetime_to_datetime2_6_on_mssql_.py
Show resolved
Hide resolved
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 wonder if it’d be a good idea to make Pydocstyle skip the migrations directory altogether, since the docstring auto-generated by alembic by default does not follow D400. Or maybe we need to configure alembic to emit a different migration file template.
|
Would it be possible to split migrations and providers into another PR, or does everything must be fixed once? This is really a lot. |
I can split. Let me do that. That'll definitely help the review |
|
Hold on. No, that wont work. Static checks will fail unless we specify we want to run the D400 check only on specific files/folders. I am not sure it is possible |
|
Or one solution would be to make the modifications without enabling the check. Let me know, what you think |
Yeah that’s what I suspected as well 😞
This sounds like a workable alternative. I think we did that when we enabled some other checks previously. Make the changes gradually, and enable the check only after all (or most of) the changes are made. IIRC @Bowrna worked on some of the changes back then and may be able to share some experience. |
|
yes let me check the changes i have done and tell you. for testing purpose, i remember i enabled it to run for specific files alone before enabling it for all the files. |
Oh if that's possible, that would be lovely! |
|
@Bowrna Did you find it? Otherwise, no big deal, I'll split this PR without enabling the check at first |
|
hi @vincbeck sorry for not updating here quickly. When I made a change for the pydocstyle I had a file named
Reference PR: https://github.com/apache/airflow/pull/24221/files# |
|
Thanks for the answer! I see, this is actually what I was planning to do. Thanks :) |
|
I created a PR to address only Airflow core: #31297. Other PRs will come along later |
|
I converted this PR in draft since we do not want to merge it but I'll keep it open to track the overall work on D400 check |

Enable D400 pydocstyle check. Part of #10742.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.