diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index a570dd70b4c..1878938989e 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -450,9 +450,7 @@ def fmt_docstring(module_func): aliases.append(" :columns: 3\n") for arg in sorted(module_func.aliases): alias = module_func.aliases[arg] - # Trailing dash means it's not aliased but should be listed. - # Remove the trailing dash if it exists. - aliases.append(f" - {arg} = {alias.rstrip('-')}") + aliases.append(f" - {arg} = {alias}") filler_text["aliases"] = "\n".join(aliases) filler_text["table-classes"] = ( @@ -486,9 +484,6 @@ def _insert_alias(module_func, default_value=None): kwargs_param = wrapped_params.pop(-1) # Add new parameters from aliases for alias in module_func.aliases.values(): - if alias.endswith("-"): - # Trailing dash means it's not aliased but should be listed. - continue if alias not in sig.parameters: new_param = Parameter( alias, kind=Parameter.KEYWORD_ONLY, default=default_value @@ -553,31 +548,6 @@ def new_module(*args, **kwargs): New module that parses and replaces the registered aliases. """ for short_param, long_alias in aliases.items(): - if long_alias.endswith("-"): - _long_alias = long_alias.rstrip("-") - # Trailing dash means it's not aliased but should be listed. - _alias_list = _long_alias.split("/") - if ( - any(_alias in kwargs for _alias in _alias_list) - and short_param in kwargs - ): # Both long- and short- forms are given. - msg = ( - f"Parameters in short-form ({short_param}) and " - f"long-form ({_long_alias}) can't coexist." - ) - raise GMTInvalidInput(msg) - if short_param in kwargs: # Only short-alias is given - if len(_alias_list) > 1: # Aliased to multiple long-forms - msg = ( - f"Short-form parameter ({short_param}) is not " - f"recognized. Use long-form parameter(s) " - f"'{_long_alias}' instead." - ) - raise GMTInvalidInput(msg) - # If there is only one long-form parameter, use it. - kwargs[_long_alias] = kwargs.pop(short_param) - continue - if long_alias in kwargs and short_param in kwargs: msg = ( f"Parameters in short-form ({short_param}) and " diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 0df6b32b3d8..bba928d600e 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -126,7 +126,6 @@ def _auto_offset(spec) -> bool: L="outline", N="no_clip", R="region", - S="scale/convention/component-", T="nodal", V="verbose", W="pen", @@ -202,7 +201,8 @@ def meca( # noqa: PLR0913 Full GMT docs at :gmt-docs:`supplements/seis/meca.html`. {aliases} - - J=projection + - J = projection + - S = scale/convention/component Parameters ---------- diff --git a/pygmt/src/text.py b/pygmt/src/text.py index cd8e788e691..ac40186d4ba 100644 --- a/pygmt/src/text.py +++ b/pygmt/src/text.py @@ -27,7 +27,6 @@ B="frame", C="clearance", D="offset", - F="position/angle/font/justify-", G="fill", N="no_clip", V="verbose", @@ -73,7 +72,8 @@ def text_( # noqa: PLR0912 Full GMT docs at :gmt-docs:`text.html`. {aliases} - - J=projection + - F = **+a**: angle, **+c**: position, **+j**: justify, **+f**: font + - J = projection Parameters ---------- diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index e4885809680..06ce69884cf 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -12,7 +12,6 @@ @use_alias( B="frame", D="position", - G="fillpositive/fillnegative-", R="region", T="track", V="verbose",