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/01/14 04:49:14 UTC

[GitHub] [airflow] uranusjr opened a new pull request #20868: Rewrite the task decorator as a composition

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


   With more and more things being put into the `@task` decorator, it becomes more difficult to see what names are being used, since the mixin-inheritance structure requires looking at the mixin declarations to know what names each mixin provides. This troubles me while reviewing #20860.
   
   By using a composition-based approach, these names become immediately visible in the same file, making it easier to design and review new name additions.
   
   I also added some more type annotations to make the return type easier to check. This PR does not include any functional changes.


-- 
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 #20868: Rewrite the task decorator as a composition

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


   > Ah i think my VSCode wasn't using the virtual env where Airflow was installed in :)
   
   VScode :)? 


-- 
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 pull request #20868: Rewrite the task decorator as a composition

Posted by GitBox <gi...@apache.org>.
uranusjr commented on pull request #20868:
URL: https://github.com/apache/airflow/pull/20868#issuecomment-1013124099


   Hmm, looks like not all autocompletion systems are smart enough to “look through” `staticmethod`. I changed the implementation to use a metaclass. Does that work better?


-- 
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] ashb commented on pull request #20868: Rewrite the task decorator as a composition

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #20868:
URL: https://github.com/apache/airflow/pull/20868#issuecomment-1013193173


   Nope, still no joy this way.
   
   Though now looking at it, something about the current way is broken too, and it doesn't actually work right now either :( 


-- 
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 edited a comment on pull request #20868: Rewrite the task decorator as a composition

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #20868:
URL: https://github.com/apache/airflow/pull/20868#issuecomment-1014675822


   > Ah i think my VSCode wasn't using the virtual env where Airflow was installed in :)
   
   VSCode :) You ? 


-- 
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] ashb commented on pull request #20868: Rewrite the task decorator as a composition

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #20868:
URL: https://github.com/apache/airflow/pull/20868#issuecomment-1013079156


   This doesn't work for autocompletion:
   
   ![image](https://user-images.githubusercontent.com/34150/149515980-e55cdbd2-4054-4ee8-87d2-99fbbafdeba2.png)
   


-- 
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] github-actions[bot] commented on pull request #20868: Rewrite the task decorator as a composition

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #20868:
URL: https://github.com/apache/airflow/pull/20868#issuecomment-1014323062


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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 #20868: Rewrite the task decorator as a composition

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


   


-- 
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] ashb commented on pull request #20868: Rewrite the task decorator as a composition

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #20868:
URL: https://github.com/apache/airflow/pull/20868#issuecomment-1014320910


   Ah i think my VSCode wasn't using the virtual env where Airflow was installed in :) 


-- 
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