Skip to content

Commit

Permalink
taxon list: use rank equivalent in title
Browse files Browse the repository at this point in the history
  • Loading branch information
synrg committed Aug 14, 2024
1 parent d13f8a7 commit a85c709
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inatcog/commands/taxon.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ async def taxon_list(self, ctx, *, query: Optional[str]):
"Specify `per <rank-or-keyword>`. "
f"See `{ctx.clean_prefix}help taxon list` for details."
)
short_description = self.p.plural(per_rank).capitalize()
taxon = query_response.taxon
if not taxon.children:
taxon = await ctx.inat_client.taxa.populate(taxon)
Expand Down Expand Up @@ -167,7 +166,10 @@ async def taxon_list(self, ctx, *, query: Optional[str]):
*_children,
*(await _descendants.async_all()),
]
if _per_rank != "child":
if _per_rank == "child":
short_description = "Children"
else:
short_description = self.p.plural(_per_rank).capitalize()
# List all ranks at the same level, not just the specified rank
_per_rank = RANKS_FOR_LEVEL[rank_level]
order = _query.order or None
Expand Down

0 comments on commit a85c709

Please sign in to comment.