File tree Expand file tree Collapse file tree 2 files changed +28
-19
lines changed
Expand file tree Collapse file tree 2 files changed +28
-19
lines changed Original file line number Diff line number Diff line change @@ -250,27 +250,32 @@ def get_string(self):
250250 blocks .append ("{tb}command <<<\n {args}\n {tb}>>>" .format (tb = tb , args = com ))
251251
252252 if self .runtime :
253+ rt = self .runtime .get_string (indent = 2 )
253254 blocks .append (
254255 "{tb}runtime {{\n {args}\n {tb}}}" .format (
255256 tb = tb ,
256- args = " \n " . join (( 2 * tb ) + a for a in self . runtime . get_string ()) ,
257+ args = rt ,
257258 )
258259 )
259260
260261 if self .meta :
261- blocks .append (
262- "{tb}meta {{\n {args}\n {tb}}}" .format (
263- tb = tb , args = "\n " .join ((2 * tb ) + a for a in self .meta .get_string ())
262+ mt = self .meta .get_string (indent = 2 )
263+ if mt :
264+ blocks .append (
265+ "{tb}meta {{\n {args}\n {tb}}}" .format (
266+ tb = tb , args = mt
267+ )
264268 )
265- )
266269
267270 if self .param_meta :
268- blocks .append (
269- "{tb}parameter_meta {{\n {args}\n {tb}}}" .format (
270- tb = tb ,
271- args = "\n " .join ((2 * tb ) + a for a in self .param_meta .get_string ()),
271+ pmt = self .param_meta .get_string (indent = 2 )
272+ if pmt :
273+ blocks .append (
274+ "{tb}parameter_meta {{\n {args}\n {tb}}}" .format (
275+ tb = tb ,
276+ args = pmt
277+ )
272278 )
273- )
274279
275280 if self .outputs :
276281 blocks .append (
Original file line number Diff line number Diff line change @@ -72,19 +72,23 @@ def get_string(self):
7272 imports_block = "\n " .join (i .get_string () for i in self .imports )
7373
7474 if self .meta :
75- blocks .append (
76- "{tb}meta {{\n {args}\n {tb}}}" .format (
77- tb = tb , args = "\n " .join ((2 * tb ) + a for a in self .meta .get_string ())
75+ mt = self .meta .get_string (indent = 2 )
76+ if mt :
77+ blocks .append (
78+ "{tb}meta {{\n {args}\n {tb}}}" .format (
79+ tb = tb , args = mt
80+ )
7881 )
79- )
8082
8183 if self .param_meta :
82- blocks .append (
83- "{tb}parameter_meta {{\n {args}\n {tb}}}" .format (
84- tb = tb ,
85- args = "\n " .join ((2 * tb ) + a for a in self .param_meta .get_string ()),
84+ pmt = self .param_meta .get_string (indent = 2 )
85+ if pmt :
86+ blocks .append (
87+ "{tb}parameter_meta {{\n {args}\n {tb}}}" .format (
88+ tb = tb ,
89+ args = pmt
90+ )
8691 )
87- )
8892
8993 if self .outputs :
9094 outs = []
You can’t perform that action at this time.
0 commit comments