Skip to content

Commit acaf350

Browse files
committed
Improve type-hint of text parameter in pygmt.Figure.text
Include pyarrow.StringArray besides Sequence[str] or np.ndarray.
1 parent ef431af commit acaf350

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pygmt/src/text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from collections.abc import Sequence
66

77
import numpy as np
8-
from pygmt._typing import AnchorCode
8+
from pygmt._typing import AnchorCode, StringArrayTypes
99
from pygmt.clib import Session
1010
from pygmt.exceptions import GMTInvalidInput
1111
from pygmt.helpers import (
@@ -48,7 +48,7 @@ def text_( # noqa: PLR0912
4848
x=None,
4949
y=None,
5050
position: AnchorCode | None = None,
51-
text=None,
51+
text: str | StringArrayTypes = None,
5252
angle=None,
5353
font=None,
5454
justify: bool | None | AnchorCode | Sequence[AnchorCode] = None,
@@ -104,7 +104,7 @@ def text_( # noqa: PLR0912
104104
105105
For example, ``position="TL"`` plots the text at the Top Left corner
106106
of the map.
107-
text : str or 1-D array
107+
text
108108
The text string, or an array of strings to plot on the figure.
109109
angle: float, str, bool or list
110110
Set the angle measured in degrees counter-clockwise from

0 commit comments

Comments
 (0)