From e02e10c32cec48dcec90fcab92e4206a79e19869 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Tue, 10 Jan 2023 17:01:52 -0800 Subject: [PATCH] run format --- jrnl/DayOneJournal.py | 10 +++++++--- jrnl/install.py | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 627b9c65..e907ce82 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -74,7 +74,8 @@ class DayOne(Journal.Journal): self.config["tagsymbols"][0] + tag.lower() for tag in dict_entry.get("Tags", []) ] - if entry._tags: entry._tags.sort() + if entry._tags: + entry._tags.sort() """Extended DayOne attributes""" # just ignore it if the keys don't exist @@ -196,7 +197,8 @@ class DayOne(Journal.Journal): for entry in entries_from_editor: entry = self._get_and_remove_uuid_from_entry(entry) - if entry._tags: entry._tags.sort() + if entry._tags: + entry._tags.sort() # Remove deleted entries edited_uuids = [e.uuid for e in entries_from_editor] @@ -207,7 +209,9 @@ class DayOne(Journal.Journal): for old_entry in self.entries: if entry.uuid == old_entry.uuid: if old_entry._tags: - tags_not_in_body = [tag for tag in old_entry._tags if(tag not in entry._body)] + tags_not_in_body = [ + tag for tag in old_entry._tags if (tag not in entry._body) + ] if tags_not_in_body: entry._tags.extend(tags_not_in_body.sort()) self._update_old_entry(old_entry, entry) diff --git a/jrnl/install.py b/jrnl/install.py index 9fab98cc..239f07be 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -41,8 +41,8 @@ def upgrade_config(config_data: dict, alt_config_path: str | None = None) -> Non if missing_keys: for key in missing_keys: config_data[key] = default_config[key] - - different_version = (config_data["version"] != __version__) + + different_version = config_data["version"] != __version__ if different_version: config_data["version"] = __version__