You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/09/11 09:59:06 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #34223: Refactor: Simplify some loops

uranusjr commented on code in PR #34223:
URL: https://github.com/apache/airflow/pull/34223#discussion_r1321301768


##########
dev/assign_cherry_picked_prs_with_milestone.py:
##########
@@ -291,8 +291,7 @@ def assign_prs(
     changelog_changes: list[Change] = []
     doc_only_changes: list[Change] = []
     excluded_changes: list[Change] = []
-    for i in range(count_prs):
-        pr_number = prs[i]
+    for pr_number, change in zip(prs[:count_prs], changes):

Review Comment:
   Really the entire `prs` list is unnecessary, we can simply get `pr_number` by
   
   ```python
   for change in changes[:count_prs]:
       pr_number = change.pr
       ...
   ```



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