chore (mark_as_read.py): reduce a nested for loop to enhance readability

This commit is contained in:
eeemsi 2023-02-05 10:11:54 +01:00
parent 3a96009467
commit 4d2d863fb7
1 changed files with 7 additions and 5 deletions

View File

@ -47,12 +47,14 @@ def get_ids_older_ndays():
entries = request_unread.json()
if entries["entries"]:
for item in entries["entries"]:
if item['feed']['category']['title'] in config['options']['ignore']:
continue
if not entries["entries"]:
return
id_array.append(item["id"])
for item in entries["entries"]:
if item['feed']['category']['title'] in config['options']['ignore']:
continue
id_array.append(item["id"])
def mark_as_read():
""" mark ids from id_array as read