Skip to content

Commit 6840b39

Browse files
committed
Remove the old aliases
1 parent fbdd936 commit 6840b39

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

pygmt/src/coast.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
A="area_thresh",
2323
B="frame",
2424
C="lakes",
25-
D="resolution",
2625
E="dcw",
2726
F="box",
2827
G="land",
@@ -41,7 +40,7 @@
4140
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
4241
def coast(
4342
self,
44-
resolution: Literal[ # noqa: ARG001
43+
resolution: Literal[
4544
"auto", "full", "high", "intermediate", "low", "crude"
4645
] = "auto",
4746
**kwargs,
@@ -210,9 +209,8 @@ def coast(
210209
lakes, land, water, rivers, borders, dcw, Q, or shorelines"""
211210
)
212211

213-
# Resolution
214-
if kwargs.get("D") is not None:
215-
kwargs["D"] = kwargs["D"][0]
212+
# Alias 'resolution' to "D".
213+
kwargs["D"] = resolution[0]
216214

217215
with Session() as lib:
218216
lib.call_module(module="coast", args=build_arg_list(kwargs))

pygmt/src/grdlandmask.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@fmt_docstring
1616
@use_alias(
1717
A="area_thresh",
18-
D="resolution",
1918
E="bordervalues",
2019
I="spacing",
2120
N="maskvalues",
@@ -27,7 +26,7 @@
2726
@kwargs_to_strings(I="sequence", R="sequence", N="sequence", E="sequence")
2827
def grdlandmask(
2928
outgrid: str | None = None,
30-
resolution: Literal["full", "high", "intermediate", "low", "crude"] = "low", # noqa: ARG001
29+
resolution: Literal["full", "high", "intermediate", "low", "crude"] = "low",
3130
**kwargs,
3231
) -> xr.DataArray | None:
3332
r"""
@@ -100,10 +99,8 @@ def grdlandmask(
10099
if kwargs.get("I") is None or kwargs.get("R") is None:
101100
raise GMTInvalidInput("Both 'region' and 'spacing' must be specified.")
102101

103-
# Resolution
104-
if kwargs.get("D") is not None:
105-
kwargs["D"] = kwargs["D"][0]
106-
102+
# Alias "resolution" to "D"
103+
kwargs["D"] = resolution[0]
107104
with Session() as lib:
108105
with lib.virtualfile_out(kind="grid", fname=outgrid) as voutgrd:
109106
kwargs["G"] = voutgrd

pygmt/src/select.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
@use_alias(
2323
A="area_thresh",
2424
C="dist2pt",
25-
D="resolution",
2625
F="polygon",
2726
G="gridmask",
2827
I="reverse",
@@ -48,7 +47,7 @@ def select(
4847
data=None,
4948
output_type: Literal["pandas", "numpy", "file"] = "pandas",
5049
outfile: str | None = None,
51-
resolution: Literal["full", "high", "intermediate", "low", "crude"] = "low", # noqa: ARG001
50+
resolution: Literal["full", "high", "intermediate", "low", "crude"] = "low",
5251
**kwargs,
5352
) -> pd.DataFrame | np.ndarray | None:
5453
r"""
@@ -203,9 +202,8 @@ def select(
203202
>>> # longitudes 246 and 247 and latitudes 20 and 21
204203
>>> out = pygmt.select(data=ship_data, region=[246, 247, 20, 21])
205204
"""
206-
# Resolution
207-
if kwargs.get("D") is not None:
208-
kwargs["D"] = kwargs["D"][0]
205+
# Alias "resolution" to "D"
206+
kwargs["D"] = resolution[0]
209207

210208
output_type = validate_output_table_type(output_type, outfile=outfile)
211209

0 commit comments

Comments
 (0)