Skip to content

Commit bcdc821

Browse files
author
notactuallyfinn
committed
added lots of comments and fixed small inconsistencies
1 parent 520ef39 commit bcdc821

6 files changed

Lines changed: 342 additions & 35 deletions

File tree

src/hermes/commands/deposit/invenio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def _codemeta_to_invenio_deposition(self) -> dict:
513513

514514
creators = []
515515
for author in metadata.get("author", []):
516-
if not "Person" in author.get("@type", []):
516+
if "Person" not in author.get("@type", []):
517517
continue
518518
creator = {}
519519
if len(
@@ -527,7 +527,7 @@ def _codemeta_to_invenio_deposition(self) -> dict:
527527
raise HermesValidationError(f"Author has too many family names: {author}")
528528
if len(author.get("familyName", [])) == 1:
529529
given_names_str = " ".join(author.get("givenName", []))
530-
name = f"{author["familyName"][0]}, {given_names_str}"
530+
name = f"{author['familyName'][0]}, {given_names_str}"
531531
elif len(author.get("name", [])) != 1:
532532
raise HermesValidationError(f"Author has too many or no names: {author}")
533533
else:

0 commit comments

Comments
 (0)