mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 09:28:31 +02:00
run format
This commit is contained in:
parent
9547411390
commit
e02e10c32c
2 changed files with 9 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -42,7 +42,7 @@ def upgrade_config(config_data: dict, alt_config_path: str | None = None) -> Non
|
|||
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__
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue