Skip to content

Commit

Permalink
Merge pull request #121 from HaakonEidemHaakstad/master
Browse files Browse the repository at this point in the history
Rewrite a loop as list comprehension.
  • Loading branch information
arshadkazmi42 authored Nov 13, 2024
2 parents 0660aba + 475c079 commit 11efcb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions first_timers/first_timers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ def get_first_timer_issues(issue_label: str) -> list:
res = requests.get(FIRST_ISSUE_QUERY_URL.format(issue_label))
res.raise_for_status()

items = []
for item in res.json()['items']:
if check_days_passed(item['created_at'], DAYS_OLD):
items.append(item)
items = [item for item in res.json()['items']
if check_days_passed(item['created_at'], DAYS_OLD)]

return items

Expand Down

0 comments on commit 11efcb1

Please sign in to comment.