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/30 17:54:25 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #5965: [AIRFLOW-5359] Update type annotations in BaseOperator

kaxil commented on a change in pull request #5965: [AIRFLOW-5359] Update type annotations in BaseOperator
URL: https://github.com/apache/airflow/pull/5965#discussion_r319617606
 
 

 ##########
 File path: airflow/models/baseoperator.py
 ##########
 @@ -262,38 +262,38 @@ def __init__(
         self,
         task_id: str,
         owner: str = configuration.conf.get('operators', 'DEFAULT_OWNER'),
-        email: Optional[str] = None,
+        email: str = None,
         email_on_retry: bool = True,
         email_on_failure: bool = True,
         retries: int = None,
         retry_delay: timedelta = timedelta(seconds=300),
         retry_exponential_backoff: bool = False,
-        max_retry_delay: Optional[datetime] = None,
-        start_date: Optional[datetime] = None,
-        end_date: Optional[datetime] = None,
+        max_retry_delay: datetime = None,
+        start_date: datetime = None,
+        end_date: datetime = None,
         schedule_interval=None,  # not hooked as of now
         depends_on_past: bool = False,
         wait_for_downstream: bool = False,
-        dag: Optional[DAG] = None,
-        params: Optional[Dict] = None,
-        default_args: Optional[Dict] = None,
+        dag: DAG = None,
+        params: Dict = None,
+        default_args: Dict = None,
         priority_weight: int = 1,
         weight_rule: str = WeightRule.DOWNSTREAM,
         queue: str = configuration.conf.get('celery', 'default_queue'),
         pool: str = Pool.DEFAULT_POOL_NAME,
-        sla: Optional[timedelta] = None,
-        execution_timeout: Optional[timedelta] = None,
-        on_failure_callback: Optional[Callable] = None,
-        on_success_callback: Optional[Callable] = None,
-        on_retry_callback: Optional[Callable] = None,
 
 Review comment:
   This should be `Optional[Callable]`, all the callbacks are optional so they can take None or a callable function

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