Skip to content

Commit

Permalink
Improve type-hint of text parameter in pygmt.Figure.text
Browse files Browse the repository at this point in the history
Include pyarrow.StringArray besides Sequence[str] or np.ndarray.
  • Loading branch information
weiji14 committed Nov 15, 2024
1 parent ef431af commit acaf350
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from collections.abc import Sequence

import numpy as np
from pygmt._typing import AnchorCode
from pygmt._typing import AnchorCode, StringArrayTypes
from pygmt.clib import Session
from pygmt.exceptions import GMTInvalidInput
from pygmt.helpers import (
Expand Down Expand Up @@ -48,7 +48,7 @@ def text_( # noqa: PLR0912
x=None,
y=None,
position: AnchorCode | None = None,
text=None,
text: str | StringArrayTypes = None,
angle=None,
font=None,
justify: bool | None | AnchorCode | Sequence[AnchorCode] = None,
Expand Down Expand Up @@ -104,7 +104,7 @@ def text_( # noqa: PLR0912
For example, ``position="TL"`` plots the text at the Top Left corner
of the map.
text : str or 1-D array
text
The text string, or an array of strings to plot on the figure.
angle: float, str, bool or list
Set the angle measured in degrees counter-clockwise from
Expand Down

0 comments on commit acaf350

Please sign in to comment.