Optimize code to lessen indent
MODIFY
plextraktsync/trakt_api.py
plextraktsync/trakt_api.py
@@ -454,7 +454,8 @@ def remove_empty_values(result):
This makes diagnostic printing cleaner if we don't print "changed: 0"
"""
for change_type in ["added", "existing", "updated"]:
- if change_type in result:
+ if change_type not in result:
+ continue
for media_type, value in result[change_type].copy().items():
if value == 0:
del result[change_type][media_type]

Optimize code to lessen indent