[
https://issues.apache.org/jira/browse/AIRFLOW-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976025#comment-16976025
]
ASF GitHub Bot commented on AIRFLOW-5940:
-----------------------------------------
potiuk commented on pull request #6591: [AIRFLOW-5940] Remove redundant Code in
models.dagrun
URL: https://github.com/apache/airflow/pull/6591
----------------------------------------------------------------
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:
[email protected]
> Remove redundant Code in models.dagrun
> --------------------------------------
>
> Key: AIRFLOW-5940
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5940
> Project: Apache Airflow
> Issue Type: Improvement
> Components: core
> Affects Versions: 2.0.0, 1.10.6
> Reporter: Kaxil Naik
> Assignee: Kaxil Naik
> Priority: Trivial
>
> The below code in models.dagrun contains redundant code
> {code:python}
> is_task_in_dag = task is not None
> should_restore_task = is_task_in_dag and ti.state == State.REMOVED
> {code}
> It can be simplified by:
> {code:python}
> should_restore_task = (task is not None) and ti.state == State.REMOVED
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)