Skip to content

Commit 57099a2

Browse files
Be strict with single and plural in parameter name regarding input
1 parent 1013809 commit 57099a2

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

pygmt/src/grdproject.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
from pygmt.alias import Alias, AliasSystem
1111
from pygmt.clib import Session
1212
from pygmt.exceptions import GMTInvalidInput
13-
from pygmt.helpers import build_arg_list, deprecate_parameter, fmt_docstring, use_alias
13+
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
1414

1515
__doctest_skip__ = ["grdproject"]
1616

1717

1818
@fmt_docstring
19-
@deprecate_parameter("unit", "units", "v0.18.0", remove_version="v0.20.0")
20-
@use_alias(E="dpi", F="scaling", I="inverse", M="units", n="interpolation")
19+
@use_alias(E="dpi", F="scaling", I="inverse", M="unit", n="interpolation")
2120
def grdproject(
2221
grid: PathLike | xr.DataArray,
2322
outgrid: PathLike | None = None,
@@ -84,7 +83,7 @@ def grdproject(
8483
**k** (kilometers), **M** (statute miles), **n** (nautical miles),
8584
**u** (US survey feet), **i** (inches), **c** (centimeters), or
8685
**p** (points).
87-
units : str
86+
unit : str
8887
Append **c**, **i**, or **p** to indicate that centimeters, inches, or
8988
points should be the projected measure unit. Cannot be used with
9089
``scaling``.

pygmt/src/sphdistance.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
from pygmt.alias import Alias, AliasSystem
1212
from pygmt.clib import Session
1313
from pygmt.exceptions import GMTInvalidInput
14-
from pygmt.helpers import build_arg_list, deprecate_parameter, fmt_docstring, use_alias
14+
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
1515

1616
__doctest_skip__ = ["sphdistance"]
1717

1818

1919
@fmt_docstring
20-
@deprecate_parameter("unit", "units", "v0.18.0", remove_version="v0.20.0")
2120
@use_alias(
2221
C="single_form",
2322
D="duplicate",
2423
E="quantity",
25-
L="units",
24+
L="unit",
2625
N="node_table",
2726
Q="voronoi",
2827
)
@@ -86,7 +85,7 @@ def sphdistance(
8685
8786
Optionally, append the resampling interval along Voronoi arcs in
8887
spherical degrees.
89-
units : str
88+
unit : str
9089
Specify the unit used for distance calculations. Choose among **d**
9190
(spherical degrees), **e** (meters), **f** (feet), **k** (kilometers),
9291
**M** (miles), **n** (nautical miles), or **u** (survey feet).

0 commit comments

Comments
 (0)