Skip to content

Commit a2fc88f

Browse files
committed
For some modules, pass a list of input files instead of space-separated filename string
1 parent 5e383bd commit a2fc88f

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

pygmt/src/text.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@
3737
t="transparency",
3838
w="wrap",
3939
)
40-
@kwargs_to_strings(
41-
R="sequence",
42-
textfiles="sequence_space",
43-
c="sequence_comma",
44-
p="sequence",
45-
)
40+
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
4641
def text_( # noqa: PLR0912
4742
self,
4843
textfiles=None,

pygmt/src/which.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
GMTTempFile,
88
build_arg_list,
99
fmt_docstring,
10-
kwargs_to_strings,
1110
use_alias,
1211
)
1312

1413

1514
@fmt_docstring
1615
@use_alias(G="download", V="verbose")
17-
@kwargs_to_strings(fname="sequence_space")
1816
def which(fname, **kwargs):
1917
r"""
2018
Find the full path to specified files.
@@ -72,6 +70,5 @@ def which(fname, **kwargs):
7270
)
7371
path = tmpfile.read().strip()
7472
if not path:
75-
_fname = fname.replace(" ", "', '")
76-
raise FileNotFoundError(f"File(s) '{_fname}' not found.")
73+
raise FileNotFoundError(f"File(s) '{fname}' not found.")
7774
return path.split("\n") if "\n" in path else path

pygmt/src/x2sys_cross.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
223223
outfile = tmpfile.name
224224
lib.call_module(
225225
module="x2sys_cross",
226-
args=build_arg_list(
227-
kwargs, infile=" ".join(fnames), outfile=outfile
228-
),
226+
args=build_arg_list(kwargs, infile=fnames, outfile=outfile),
229227
)
230228

231229
# Read temporary csv output to a pandas table

0 commit comments

Comments
 (0)