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/07/20 04:11:20 UTC

[GitHub] [airflow] uranusjr opened a new pull request, #25173: Improve taskflow type hints with ParamSpec

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

   This needs #25085 to be merged first.
   
   Submitted for CI now.


-- 
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 #25173: Improve taskflow type hints with ParamSpec

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


##########
airflow/providers/salesforce/operators/bulk.py:
##########
@@ -47,7 +47,7 @@ class SalesforceBulkOperator(BaseOperator):
     def __init__(
         self,
         *,
-        operation: Literal[available_operations],
+        operation: Literal['insert', 'update', 'upsert', 'delete', 'hard_delete'],

Review Comment:
   Python syntactically does not allow using `*` in brackets. The previous `Literal[available_operations]` is valid Python [but PEP 586 considered this out of scope](https://peps.python.org/pep-0586/#rejected-or-out-of-scope-ideas).



-- 
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 #25173: Improve taskflow type hints with ParamSpec

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


##########
airflow/providers/salesforce/operators/bulk.py:
##########
@@ -47,7 +47,7 @@ class SalesforceBulkOperator(BaseOperator):
     def __init__(
         self,
         *,
-        operation: Literal[available_operations],
+        operation: Literal['insert', 'update', 'upsert', 'delete', 'hard_delete'],

Review Comment:
   It’s a syntax limitation, Python does not allow using `*` in brackets. The previous `Literal[available_operations]` is valid Python [but PEP 586 considered this out of scope](https://peps.python.org/pep-0586/#rejected-or-out-of-scope-ideas).



-- 
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 a diff in pull request #25173: Improve taskflow type hints with ParamSpec

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


##########
airflow/providers/salesforce/operators/bulk.py:
##########
@@ -47,7 +47,7 @@ class SalesforceBulkOperator(BaseOperator):
     def __init__(
         self,
         *,
-        operation: Literal[available_operations],
+        operation: Literal['insert', 'update', 'upsert', 'delete', 'hard_delete'],

Review Comment:
   Is it not possible to do 
   ```suggestion
           operation: Literal[*available_operations],
   ```
   



-- 
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 #25173: Improve taskflow type hints with ParamSpec

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


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