Skip to content
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

D401 Support - Macros to Operators (Inclusive) #33337

Merged
merged 2 commits into from
Aug 12, 2023

Conversation

ferruzzi
Copy link
Contributor

Part of #10742

D401 asserts "First line should be in imperative mood". This is a little opaque so upon further investigation what they want is:

[Docstring] prescribes the function or method's effect as a command: 
("Do this", "Return that"), not as a description; 
e.g. don't write "Returns the pathname ...".

We started with over two thousand violations in the repo so I'm going to take this in bites.

PLEASE NOTE

There should be zero logic changes in this PR, only changes to docstrings and whitespace. If you see otherwise, please call it out.

Included in this chunk

All files located in the following modules:

  • airflow/macros
  • airflow/metrics
  • airflow/migrations
  • airflow/models
  • airflow/notifications
  • airflow/operators

To test

If you uncomment this line and run pre-commit in main you will get over a thousand errors. After these changes, no files in the list above should be on the list. After re-commenting that line and re-running pre-commits, there should be zero regressions.

@boring-cyborg boring-cyborg bot added area:core-operators Operators, Sensors and hooks within Core Airflow area:serialization area:Triggerer labels Aug 12, 2023
@ferruzzi ferruzzi changed the title D401 Support - airflow/macros thru airflow/operators (Inclusive) D401 Support - Macros to Operators (Inclusive) Aug 12, 2023
@potiuk
Copy link
Member

potiuk commented Aug 12, 2023

Static checks need fixing :)

@ferruzzi
Copy link
Contributor Author

I wasn't expecting those files to be generated so I didn't include them in the commit. This should fix it.

@potiuk
Copy link
Member

potiuk commented Aug 12, 2023

I wasn't expecting those files to be generated so I didn't include them in the commit. This should fix it.

Our CI is sometimes smarter than we are, indeed.

@potiuk potiuk merged commit 2efb3a6 into apache:main Aug 12, 2023
1 check passed
ferruzzi added a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 17, 2023
* D401 Support - airflow/macros thru airflow/operators

* fix static checks
@ephraimbuddy ephraimbuddy added the type:misc/internal Changelog: Misc changes that should appear in change log label Aug 27, 2023
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.1 milestone Aug 27, 2023
ephraimbuddy pushed a commit that referenced this pull request Aug 28, 2023
* D401 Support - airflow/macros thru airflow/operators

* fix static checks

(cherry picked from commit 2efb3a6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core-operators Operators, Sensors and hooks within Core Airflow area:serialization area:Triggerer type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants