Skip to content

Commit a8c606d

Browse files
committed
Should check if a path is PurePath rather than Path
1 parent 0e96906 commit a8c606d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pygmt/helpers/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def data_kind(data, x=None, y=None, z=None, required_z=False, optional_data=Fals
8686
raise GMTInvalidInput("Must provide x, y, and z.")
8787

8888
# determine the data kind
89-
if isinstance(data, (str, pathlib.Path)):
89+
if isinstance(data, (str, pathlib.PurePath)):
9090
kind = "file"
9191
elif optional_data and (
92-
data is None or isinstance(data, (bool, int, float, str, pathlib.Path))
92+
data is None or isinstance(data, (bool, int, float, str, pathlib.PurePath))
9393
):
9494
# a null context manager will be created for "file-like" kind
9595
kind = "file"

0 commit comments

Comments
 (0)