From f9195bac8091183053352c72764fe13e0b3d896e Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 21 Jul 2019 21:53:10 +0200 Subject: [PATCH] Formatting --- gc.py | 4 +++- utils/media.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gc.py b/gc.py index 5a2bbb1..7e6f876 100644 --- a/gc.py +++ b/gc.py @@ -92,7 +92,9 @@ def perform() -> None: # TODO(tsileo): remove after tests if meta.get("keep"): - logger.warning(f"{activity!r} would not have been deleted, skipping for now") + logger.warning( + f"{activity!r} would not have been deleted, skipping for now" + ) continue # Delete the cached attachment diff --git a/utils/media.py b/utils/media.py index 9e2467f..3f6c109 100644 --- a/utils/media.py +++ b/utils/media.py @@ -65,7 +65,9 @@ class MediaCache(object): url = attachment["url"] # Ensure it's not already there - if self.fs.find_one({"url": url, "kind": Kind.ATTACHMENT.value, "remote_id": remote_id}): + if self.fs.find_one( + {"url": url, "kind": Kind.ATTACHMENT.value, "remote_id": remote_id} + ): return # If it's an image, make some thumbnails