Function
_format_authors
(items: list[dict[str, str]] | None)
Source from the content-addressed store, hash-verified
| 63 | |
| 64 | |
| 65 | def _format_authors(items: list[dict[str, str]] | None) -> tuple[str, ...]: |
| 66 | if not items: |
| 67 | return () |
| 68 | out: list[str] = [] |
| 69 | for entry in items: |
| 70 | given = entry.get("given", "").strip() |
| 71 | family = entry.get("family", "").strip() |
| 72 | if given and family: |
| 73 | out.append(f"{given} {family}") |
| 74 | elif family: |
| 75 | out.append(family) |
| 76 | elif given: |
| 77 | out.append(given) |
| 78 | return tuple(out) |
| 79 | |
| 80 | |
| 81 | async def resolve_doi( |
Tested by
no test coverage detected