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/08/11 09:29:45 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33295: Refactor: Simplify code in scripts

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


##########
scripts/ci/runners/sync_authors.py:
##########
@@ -42,15 +42,8 @@
 req = requests.get(AUTHORS)
 author_list = toml.loads(req.text)
 
-author_set = set()
-for membership in author_list:
-    author_set.update([author for author in author_list[membership]])
-
-authors = ""
-for author in sorted(author_set):
-    authors += f'            "{author}",\n'
-
-authors = authors[:-2]
+author_set = set().union(*author_list.values())
+authors = ",\n".join(f'            "{author}"' for author in author_set)

Review Comment:
   ```suggestion
   authors = ",\n".join(f'            "{author}"' for author in sorted(set(author_list.values())))
   ```



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