chore (mark_as_read.py): reduce a nested for loop to enhance readability
This commit is contained in:
parent
3a96009467
commit
4d2d863fb7
|
@ -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
|
||||
|
|
Reference in New Issue