Skip to content

Commit 480e76a

Browse files
committed
Use is_nonstr_iter
1 parent 28b2bc8 commit 480e76a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pygmt/params/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22

3-
from collections.abc import Iterable
43
from typing import NamedTuple
54

5+
from pygmt.helpers import is_nonstr_iter
6+
67

78
class Alias(NamedTuple):
89
name: str
@@ -19,7 +20,7 @@ def __str__(self):
1920
continue
2021
if value is True:
2122
value = ""
22-
if isinstance(value, Iterable) and not isinstance(value, str):
23+
if is_nonstr_iter(value):
2324
value = alias.separator.join(map(str, value))
2425
values.append(f"{alias.modifier}{value}")
2526
return "".join(values)

0 commit comments

Comments
 (0)