Skip to content

Commit 057c759

Browse files
committed
List common aliases at the end of docstrings
1 parent b4a94d7 commit 057c759

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
# Render the return argument and attribute lists in the same way as the parameter lists.
125125
napoleon_use_rtype = False
126126
napoleon_use_ivar = True
127+
napoleon_custom_sections = [("Common Parameters", "params_style")]
127128

128129
# Options for sphinx-copybutton.
129130
# Reference: https://sphinx-copybutton.readthedocs.io

pygmt/src/coast.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ def coast( # noqa: PLR0913
2727
borders: int | str | Sequence[int | str] | None = None,
2828
shorelines: bool | str | Sequence[int | str] = False,
2929
box: Box | bool = False,
30-
projection: str | None = None,
3130
frame: str | Sequence[str] | bool = False,
31+
projection: str | None = None,
3232
region: Sequence[float | str] | str | None = None,
3333
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3434
| bool = False,
3535
panel: int | Sequence[int] | bool = False,
36-
transparency: float | None = None,
3736
perspective: float | Sequence[float] | str | bool = False,
37+
transparency: float | None = None,
3838
**kwargs,
3939
):
4040
r"""
@@ -72,11 +72,7 @@ def coast( # noqa: PLR0913
7272
7373
Parameters
7474
----------
75-
$projection
76-
$region
77-
*Required if this is the first plot command.*
7875
$area_thresh
79-
$frame
8076
lakes : str or list
8177
*fill*\ [**+l**\|\ **+r**].
8278
Set the shade, color, or pattern for lakes and river-lakes. The
@@ -196,10 +192,17 @@ def coast( # noqa: PLR0913
196192
to any of the continent codes (e.g. ``"=EU"`` for Europe). Append
197193
**+p**\ *pen* to draw polygon outlines [Default is no outline] and
198194
**+g**\ *fill* to fill them [Default is no fill].
195+
196+
Common Parameters
197+
-----------------
198+
$frame
199+
$projection
200+
$region
201+
*Required if this is the first plot command.*
202+
$verbose
199203
$panel
200204
$perspective
201205
$transparency
202-
$verbose
203206
204207
Example
205208
-------

0 commit comments

Comments
 (0)