Skip to content

Commit

Permalink
et al
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed May 1, 2024
1 parent f3d8c27 commit 6aa8488
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rose/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def arrayfmt(xs: Iterable[str]) -> str:

def artistsarrayfmt(xs: Iterable[Artist]) -> str:
"""Format an array of Artists."""
return arrayfmt([x.name for x in xs if not x.alias])
strs = [x.name for x in xs if not x.alias]
return arrayfmt(strs) if len(strs) <= 3 else f"{strs[0]} et al."


def artistsfmt(a: ArtistMapping, *, omit: list[str] | None = None) -> str:
Expand Down

0 comments on commit 6aa8488

Please sign in to comment.