Skip to content

Commit dcb4a04

Browse files
committed
doc: added commandline flag and position generation to help string
1 parent 21e4874 commit dcb4a04

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nipype/interfaces/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ def _get_trait_desc(self, inputs, name, spec):
731731
desc = spec.desc
732732
xor = spec.xor
733733
requires = spec.requires
734+
argstr = spec.argstr
734735

735736
manhelpstr = ['\t%s' % name]
736737

@@ -753,6 +754,17 @@ def _get_trait_desc(self, inputs, name, spec):
753754
initial_indent='\t\t',
754755
subsequent_indent='\t\t')
755756

757+
if argstr:
758+
pos = spec.position
759+
if pos is not None:
760+
manhelpstr += wrap('flag: %s, position: %s' % (argstr, pos), 70,
761+
initial_indent='\t\t',
762+
subsequent_indent='\t\t')
763+
else:
764+
manhelpstr += wrap('flag: %s' % argstr, 70,
765+
initial_indent='\t\t',
766+
subsequent_indent='\t\t')
767+
756768
if xor:
757769
line = '%s' % ', '.join(xor)
758770
manhelpstr += wrap(line, 70,

0 commit comments

Comments
 (0)