@@ -269,7 +269,7 @@ def format_help(cls):
269269 _outputs_help (cls ) + ['' ] +
270270 _refs_help (cls )
271271 )
272- return allhelp .expandtabs (4 )
272+ return allhelp .expandtabs (8 )
273273
274274
275275def _inputs_help (cls ):
@@ -281,27 +281,27 @@ def _inputs_help(cls):
281281 ['Inputs::', '', '\t[Mandatory]', '\tin_file: (an existing file name)', ...
282282
283283 """
284- helpstr = ['Inputs::' , '' ]
284+ helpstr = ['Inputs::' ]
285285 mandatory_keys = []
286286 optional_items = []
287287
288288 if cls .input_spec :
289289 inputs = cls .input_spec ()
290290 mandatory_items = list (inputs .traits (mandatory = True ).items ())
291291 if mandatory_items :
292- helpstr += ['\t [Mandatory]' ]
293- for name , spec in sorted ( mandatory_items ) :
292+ helpstr += ['' , ' \t [Mandatory]' ]
293+ for name , spec in mandatory_items :
294294 helpstr += get_trait_desc (inputs , name , spec )
295295
296- mandatory_keys = [ item [0 ] for item in mandatory_items ]
296+ mandatory_keys = { item [0 ] for item in mandatory_items }
297297 optional_items = ['\n ' .join (get_trait_desc (inputs , name , val ))
298298 for name , val in inputs .traits (transient = None ).items ()
299299 if name not in mandatory_keys ]
300300 if optional_items :
301- helpstr += ['\t [Optional]' ] + optional_items
301+ helpstr += ['' , ' \t [Optional]' ] + optional_items
302302
303303 if not mandatory_keys and not optional_items :
304- helpstr += ['\t None' ]
304+ helpstr += ['' , ' \t None' ]
305305 return helpstr
306306
307307
@@ -319,15 +319,15 @@ def _outputs_help(cls):
319319 outputs = cls .output_spec ()
320320 outhelpstr = [
321321 '\n ' .join (get_trait_desc (outputs , name , spec ))
322- for name , spec in sorted ( outputs .traits (transient = None ).items () )]
322+ for name , spec in outputs .traits (transient = None ).items ()]
323323 if outhelpstr :
324324 helpstr = helpstr [:- 1 ] + outhelpstr
325325 return helpstr
326326
327327
328328def _refs_help (cls ):
329329 """Prints interface references."""
330- references = getattr (cls , '_references ' , None )
330+ references = getattr (cls , 'references_ ' , None )
331331 if not references :
332332 return []
333333
0 commit comments