You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/18 07:38:35 UTC

[GitHub] [airflow] uranusjr opened a new pull request, #25786: Add pre-commit hook for custom_operator_name

uranusjr opened a new pull request, #25786:
URL: https://github.com/apache/airflow/pull/25786

   As mentioned in https://github.com/apache/airflow/pull/25783#pullrequestreview-1076765975
   
   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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #25786:
URL: https://github.com/apache/airflow/pull/25786#issuecomment-1219193535

   nice!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #25786:
URL: https://github.com/apache/airflow/pull/25786#discussion_r948830898


##########
airflow/decorators/branch_python.py:
##########
@@ -38,6 +38,8 @@ class _BranchPythonDecoratedOperator(DecoratedOperator, BranchPythonOperator):
         Defaults to False.
     """
 
+    custom_operator_name = "@task.branch"
+

Review Comment:
   It will be automatically removed on merge :)



##########
airflow/decorators/branch_python.py:
##########
@@ -38,6 +38,8 @@ class _BranchPythonDecoratedOperator(DecoratedOperator, BranchPythonOperator):
         Defaults to False.
     """
 
+    custom_operator_name = "@task.branch"
+

Review Comment:
   It will be automatically "merged" on merge :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal commented on a diff in pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
eladkal commented on code in PR #25786:
URL: https://github.com/apache/airflow/pull/25786#discussion_r948815371


##########
airflow/decorators/branch_python.py:
##########
@@ -38,6 +38,8 @@ class _BranchPythonDecoratedOperator(DecoratedOperator, BranchPythonOperator):
         Defaults to False.
     """
 
+    custom_operator_name = "@task.branch"
+

Review Comment:
   since https://github.com/apache/airflow/pull/25783 was merged no need to add it again



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal commented on a diff in pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
eladkal commented on code in PR #25786:
URL: https://github.com/apache/airflow/pull/25786#discussion_r948815371


##########
airflow/decorators/branch_python.py:
##########
@@ -38,6 +38,8 @@ class _BranchPythonDecoratedOperator(DecoratedOperator, BranchPythonOperator):
         Defaults to False.
     """
 
+    custom_operator_name = "@task.branch"
+

Review Comment:
   since https://github.com/apache/airflow/pull/25783 was merged it's redundant



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #25786:
URL: https://github.com/apache/airflow/pull/25786#discussion_r949782859


##########
airflow/decorators/branch_python.py:
##########
@@ -38,6 +38,8 @@ class _BranchPythonDecoratedOperator(DecoratedOperator, BranchPythonOperator):
         Defaults to False.
     """
 
+    custom_operator_name = "@task.branch"
+

Review Comment:
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal commented on a diff in pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
eladkal commented on code in PR #25786:
URL: https://github.com/apache/airflow/pull/25786#discussion_r948815371


##########
airflow/decorators/branch_python.py:
##########
@@ -38,6 +38,8 @@ class _BranchPythonDecoratedOperator(DecoratedOperator, BranchPythonOperator):
         Defaults to False.
     """
 
+    custom_operator_name = "@task.branch"
+

Review Comment:
   since https://github.com/apache/airflow/pull/25783 was merged it's not redundant



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr merged pull request #25786: Add pre-commit hook for custom_operator_name

Posted by GitBox <gi...@apache.org>.
uranusjr merged PR #25786:
URL: https://github.com/apache/airflow/pull/25786


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org