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

This commit is contained in:
eeemsi 2023-02-04 15:34:32 +01:00
parent abbbef322d
commit 3a9a59f3c5
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