Skip to content

Commit fe3cdcd

Browse files
Apply suggestions from code review
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
1 parent 9d1db40 commit fe3cdcd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pygmt/helpers/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ def _is_printable_ascii(argstr: str) -> bool:
174174
return all(32 <= ord(c) <= 126 for c in argstr)
175175

176176

177-
def _has_apostrophe_or_backtick(argstr: str) -> bool:
177+
def _contains_apostrophe_or_backtick(argstr: str) -> bool:
178178
"""
179179
Check if a string contains apostrophe (') or backtick (`).
180180
181181
For typographical reasons, apostrophe (') and backtick (`) are mapped to left and
182-
right single quotation marks (‘ and ’) in Adobe ISOLatin1+ encoding. To ensure what
182+
right single quotation marks (‘ and ’) in Adobe ISOLatin1+ encoding. To ensure that what
183183
you type is what you get (https://github.com/GenericMappingTools/pygmt/issues/3476),
184184
they need special handling in the ``_check_encoding`` and ``non_ascii_to_octal``
185-
functions. More specifically, a string that contains printable ASCII characters with
185+
functions. More specifically, a string containing printable ASCII characters with
186186
apostrophe (') and backtick (`) will not be considered as "ascii" encoding.
187187
188188
Parameters

pygmt/tests/test_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def test_text_nonascii(encoding):
466466
@pytest.mark.mpl_image_compare
467467
def test_text_quotation_marks():
468468
"""
469-
Test typesetting single and double quotation marks.
469+
Test typesetting backtick, apostrophe, and single and double quotation marks.
470470
471471
See https://github.com/GenericMappingTools/pygmt/issues/3104 and
472472
https://github.com/GenericMappingTools/pygmt/issues/3476.

0 commit comments

Comments
 (0)