From 39a625b75ba5dceb7b44faed066dea49501a3ed6 Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 17 Jul 2016 21:23:21 -0500 Subject: [PATCH] Tweaking width to make it easier to hack on --- shreddit/shredder.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/shreddit/shredder.py b/shreddit/shredder.py index 5f53010..d4f3cb0 100644 --- a/shreddit/shredder.py +++ b/shreddit/shredder.py @@ -114,8 +114,7 @@ def remove_things(r, config, log, things): if thing_time < end_time: continue - if str(thing.subreddit).lower() in config.get("whitelist", []) \ - or thing.id in config.get("whitelist_ids", []): + if str(thing.subreddit).lower() in config.get("whitelist", []) or thing.id in config.get("whitelist_ids", []): continue if config.get("whitelist_distinguished") and thing.distinguished: @@ -141,10 +140,7 @@ def remove_things(r, config, log, things): thing.clear_vote() if isinstance(thing, Submission): - log.info("Deleting submission: #{id} {url}".format( - id=thing.id, - url=thing.url.encode("utf-8")) - ) + log.info("Deleting submission: #{id} {url}".format(id=thing.id, url=thing.url.encode("utf-8"))) elif isinstance(thing, Comment): rep_format = config.get("replacement_format") if rep_format == "random": @@ -154,12 +150,9 @@ def remove_things(r, config, log, things): else: replacement_text = rep_format - msg = '/r/{3}/ #{0} with:\n\t"{1}" to\n\t"{2}"'.format( - thing.id, - sub(b"\n\r\t", " ", thing.body[:78].encode("utf-8")), - replacement_text[:78], - thing.subreddit - ) + msg = '/r/{3}/ #{0} with:\n\t"{1}" to\n\t"{2}"'.format(thing.id, sub(b"\n\r\t", " ", + thing.body[:78].encode("utf-8")), + replacement_text[:78], thing.subreddit) if config.get("edit_only"): log.info("Editing (not removing) {msg}".format(msg=msg))