Skip to content

Commit aba9a9c

Browse files
authored
List function aliases in a more compact layout (#3666)
1 parent 5c2c631 commit aba9a9c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pygmt/helpers/decorators.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,18 +456,22 @@ def fmt_docstring(module_func):
456456
Select map :doc:`projection </projections/index>`.
457457
<BLANKLINE>
458458
**Aliases:**
459+
.. hlist::
460+
:columns: 3
459461
<BLANKLINE>
460-
- J = projection
461-
- R = region
462+
- J = projection
463+
- R = region
462464
<BLANKLINE>
463465
""" # noqa: D410,D411
464466
filler_text = {}
465467

466468
if hasattr(module_func, "aliases"):
467469
aliases = ["**Aliases:**\n"]
470+
aliases.append(".. hlist::")
471+
aliases.append(" :columns: 3\n")
468472
for arg in sorted(module_func.aliases):
469473
alias = module_func.aliases[arg]
470-
aliases.append(f"- {arg} = {alias}")
474+
aliases.append(f" - {arg} = {alias}")
471475
filler_text["aliases"] = "\n".join(aliases)
472476

473477
filler_text["table-like"] = (

0 commit comments

Comments
 (0)