Skip to content

Commit fa0c7f1

Browse files
committed
Merge pull request #1026 from oesteban/fix/DefaultValueBreaksMake
FIX: Certain default values (i.e. np.array) crash make check-before-commit
2 parents 9393555 + 6c619c2 commit fa0c7f1

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Next release
22
============
3+
* FIX: Bug crashed 'make api' (https://github.com/nipy/nipype/pull/1026)
34
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
45
* ENH: Updated N4BiasCorrection input spec to include weight image and spline order. Made
56
argument formatting consistent. Cleaned ants.segmentation according to PEP8.

nipype/interfaces/ants/legacy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _list_outputs(self):
9696
outputs = self._outputs().get()
9797
transmodel = self.inputs.transformation_model
9898

99-
# When transform is set as 'RI'/'RA', wrap fields should not be expected
99+
# When transform is set as 'RI'/'RA', wrap fields should not be expected
100100
# The default transformation is GR, which outputs the wrap fields
101101
if not isdefined(transmodel) or (isdefined(transmodel) and transmodel not in ['RI', 'RA']):
102102
outputs['warp_field'] = os.path.join(os.getcwd(),

nipype/interfaces/base.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -757,10 +757,14 @@ def _get_trait_desc(self, inputs, name, spec):
757757

758758
manhelpstr = ['\t%s' % name]
759759

760-
type_info = spec.full_info(inputs, name, None)
761-
default = ', nipype default value: %s' % spec.default_value()[1]
762-
line = "(%s%s)" % (type_info, default if spec.usedefault else '')
763-
manhelpstr = wrap(line, 70,
760+
type_info = spec.full_info(inputs, name, None)
761+
default = ''
762+
763+
if spec.usedefault:
764+
default = ', nipype default value: %s' % str(spec.default_value()[1])
765+
766+
line = "(%s%s)" % (type_info, default)
767+
manhelpstr = wrap(line, 70,
764768
initial_indent=manhelpstr[0]+': ',
765769
subsequent_indent='\t\t ')
766770

0 commit comments

Comments
 (0)