Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Grund <[email protected]>
  • Loading branch information
seisman and michaelgrund committed Sep 23, 2024
1 parent c6d0929 commit b498014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def text_( # noqa: PLR0912
if textfiles is not None and text is not None:
raise GMTInvalidInput("'text' can't be specified when 'textfiles' is given.")
if kind == "vectors" and text is None:
raise GMTInvalidInput("Must provide text with x/y pairs")
raise GMTInvalidInput("Must provide text with x/y pairs.")

# Arguments that can accept arrays.
array_args = [
Expand Down Expand Up @@ -233,7 +233,7 @@ def text_( # noqa: PLR0912
extra_arrays.append(np.atleast_1d(kwargs["t"]))
kwargs["t"] = True

# Append text at last column. Text must be passed in as str type.
# Append text to the last column. Text must be passed in as str type.
text = np.atleast_1d(text).astype(str)
encoding = _check_encoding("".join(text))
if encoding != "ascii":
Expand Down

0 comments on commit b498014

Please sign in to comment.