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

Add pre-commit hook for custom_operator_name #25786

Conversation

uranusjr
Copy link
Member

As mentioned in #25783 (review)

This helps @task operators to include a custom_operator_name attribute so they don't display an internal class name.

The check is not extensive (it ignores many special cases such as aliases), but all decorated
operators implemented following the contribution guide will be covered. And if a class does not follow the guide, it will need manual reviews to figure out a reasoning anyway.

This helps @task operators to include a custom_operator_name attribute
so they don't display an internal class name. The check is not extensive
(it ignores many special cases such as aliases), but all decorated
operators implemented following the contribution guide will be covered.
And if a class does not follow the guide, it will need manual reviews
to figure out a reasoning anyway.
@potiuk
Copy link
Member

potiuk commented Aug 18, 2022

nice!

Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

airflow/decorators/branch_python.py Outdated Show resolved Hide resolved
@uranusjr uranusjr merged commit 762235f into apache:main Aug 19, 2022
@uranusjr uranusjr deleted the pre-commit-check-all-decorators-have-custom-operator-name branch August 19, 2022 04:11
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Sep 13, 2022
@ephraimbuddy ephraimbuddy added this to the Airflow 2.4.0 milestone Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-tools area:providers changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) kind:documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants