refactor: remove unused code

This commit is contained in:
Nathaniel Landau
2023-03-21 17:17:10 -04:00
parent fa568de369
commit 4e053bda29
2 changed files with 3 additions and 3 deletions

View File

@@ -572,7 +572,7 @@ class Vault:
for _note in self.all_notes:
path = _note.note_path.relative_to(self.vault_path)
if str(path) in dictionary:
log.info(f"Updating metadata for '{path}'")
log.debug(f"Bulk update metadata for '{path}'")
num_changed += 1
_note.delete_all_metadata()
for row in dictionary[str(path)]:
@@ -589,7 +589,7 @@ class Vault:
location=self.insert_location,
)
if row["type"].lower() == "tag" or row["type"].lower() == "tags":
if row["type"].lower() == "tag":
_note.add_metadata(
area=MetadataType.TAGS,
value=row["value"],

View File

@@ -766,7 +766,7 @@ def test_update_from_dict_3(test_vault):
"test1.md": [
{"type": "frontmatter", "key": "new_key", "value": "new_value"},
{"type": "inline_metadata", "key": "new_key2", "value": "new_value"},
{"type": "tags", "key": "", "value": "new_tag"},
{"type": "tag", "key": "", "value": "new_tag"},
]
}
assert vault.update_from_dict(update_dict) == 1