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 2019/08/12 16:47:08 UTC

[GitHub] [airflow] TV4Fun commented on a change in pull request #5727: [AIRFLOW-5114] Fix gcp_transfer_hook behavior with default operator arguments

TV4Fun commented on a change in pull request #5727: [AIRFLOW-5114] Fix gcp_transfer_hook behavior with default operator arguments
URL: https://github.com/apache/airflow/pull/5727#discussion_r313020963
 
 

 ##########
 File path: airflow/contrib/hooks/gcp_transfer_hook.py
 ##########
 @@ -370,7 +372,7 @@ def wait_for_transfer_job(
         self,
         job: Dict,
         expected_statuses: Tuple[str] = (GcpTransferOperationStatus.SUCCESS,),
-        timeout: int = 60
+        timeout: Union[numbers.Real, timedelta, None] = None
 
 Review comment:
   I can replace the `Real` with a `float`. I'm not sold on using `Optional[Union[float, timedelta]]` though. This looks needlessly cluttered to me. That type is exactly equivalent to `Union[float, timedelta, None]`, and the latter looks cleaner IMHO. I'm not sure if we have any actual guidance on which to use though. I tried looking for suggestions in the style guide and couldn't find any.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services