Skip to content

Commit 9b1e7f1

Browse files
Figure.text: Deprecate parameter "incols" to "use_word" (remove in v0.10.0) (#1964)
* Rename 'incols' to 'use_word' * Replace -i placeholder with -it docstring * Add 'deprecate_parameter' for two minor releases * Remove 'i' or 'it' from 'kwargs_to_strings' * Adjust docstring corresponding to 'use_word=<integer>' Co-authored-by: Dongdong Tian <[email protected]>
1 parent dbc5682 commit 9b1e7f1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pygmt/src/text.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from pygmt.helpers import (
88
build_arg_string,
99
data_kind,
10+
deprecate_parameter,
1011
fmt_docstring,
1112
is_nonstr_iter,
1213
kwargs_to_strings,
@@ -15,6 +16,7 @@
1516

1617

1718
@fmt_docstring
19+
@deprecate_parameter("incols", "use_word", "v0.8.0", remove_version="v0.10.0")
1820
@use_alias(
1921
R="region",
2022
J="projection",
@@ -33,7 +35,7 @@
3335
e="find",
3436
f="coltypes",
3537
h="header",
36-
i="incols",
38+
it="use_word",
3739
p="perspective",
3840
t="transparency",
3941
w="wrap",
@@ -45,7 +47,6 @@
4547
font="sequence_comma",
4648
justify="sequence_comma",
4749
c="sequence_comma",
48-
i="sequence_comma",
4950
p="sequence",
5051
)
5152
def text_(
@@ -156,7 +157,10 @@ def text_(
156157
{find}
157158
{coltypes}
158159
{header}
159-
{incols}
160+
use_word : int
161+
Select a specific word from the trailing text, with the first
162+
word being 0 [Default is the entire trailing text]. No numerical
163+
columns can be specified.
160164
{perspective}
161165
{transparency}
162166
``transparency`` can also be a 1d array to set varying

0 commit comments

Comments
 (0)