You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2023/08/31 10:18:04 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #33858: replace unnecessary dict comprehension by dict() in core

Taragolis commented on code in PR #33858:
URL: https://github.com/apache/airflow/pull/33858#discussion_r1311417381


##########
airflow/api/common/experimental/get_lineage.py:
##########
@@ -49,4 +49,4 @@ def get_lineage(
     for meta in outlets:
         lineage[meta.task_id]["outlets"] = meta.value
 
-    return {"task_ids": {k: v for k, v in lineage.items()}}
+    return {"task_ids": lineage.copy()}

Review Comment:
   ```suggestion
       return {"task_ids": dict(lineage)}
   ```
   
   Otherwise you've got a copy of `defaultdict` rather than `dict`



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