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/05/28 15:57:20 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #23983: Replace `use_task_execution_date` with `use_task_logical_date`
uranusjr commented on code in PR #23983:
URL: https://github.com/apache/airflow/pull/23983#discussion_r884150587
##########
airflow/operators/datetime.py:
##########
@@ -64,10 +66,16 @@ def __init__(
self.target_upper = target_upper
self.follow_task_ids_if_true = follow_task_ids_if_true
self.follow_task_ids_if_false = follow_task_ids_if_false
- self.use_task_execution_date = use_task_execution_date
+ self.use_task_logical_date = use_task_logical_date
+ if use_task_execution_date:
+ self.use_task_logical_date = use_task_execution_date
+ warnings.warn(
+ "Parameter ``use_task_execution_date`` is deprecated. Use ``use_task_logical_date``.",
+ DeprecationWarning,
+ )
def choose_branch(self, context: Context) -> Union[str, Iterable[str]]:
- if self.use_task_execution_date is True:
+ if self.use_task_logical_date is True:
Review Comment:
```suggestion
if self.use_task_logical_date:
```
Free cleanup; no reason to check for `True` explicitly here.
--
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