Skip to content

Commit 2ab4481

Browse files
committed
sty: pep8 and metadata fixes
1 parent 2c9754b commit 2ab4481

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

nipype/interfaces/mrtrix/preprocess.py

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,41 @@ def _gen_outfilename(self):
8484
class DWI2TensorInputSpec(CommandLineInputSpec):
8585
in_file = InputMultiPath(File(exists=True), argstr='%s', mandatory=True,
8686
position=-2, desc='Diffusion-weighted images')
87-
out_filename = File(name_template="%s_tensor.mif", name_source="in_file", output_name="tensor",
88-
argstr='%s', posidesc='Output tensor filename', position=-1)
89-
encoding_file = File(argstr='-grad %s', position= 2,
87+
out_filename = File(name_template="%s_tensor.mif", name_source="in_file",
88+
output_name="tensor", argstr='%s',
89+
desc='Output tensor filename', position=-1)
90+
encoding_file = File(argstr='-grad %s', position=2,
9091
desc=('Encoding file supplied as a 4xN text file with '
9192
'each line is in the format [ X Y Z b ], where '
9293
'[ X Y Z ] describe the direction of the applied '
9394
'gradient, and b gives the b-value in units '
9495
'(1000 s/mm^2). See FSL2MRTrix()'))
9596
ignore_slice_by_volume = traits.List(traits.Int, argstr='-ignoreslices %s',
96-
sep=' ', position=2, minlen=2, maxlen=2,
97-
desc='Requires two values (i.e. [34 1] for [Slice Volume] Ignores the image slices specified when computing the tensor. Slice here means the z coordinate of the slice to be ignored.')
98-
ignore_volumes = traits.List(traits.Int, argstr='-ignorevolumes %s', sep=' ', position=2, minlen=1,
99-
desc='Requires two values (i.e. [2 5 6] for [Volumes] Ignores the image volumes specified when computing the tensor.')
100-
quiet = traits.Bool(argstr='-quiet', position=1, desc="Do not display information messages or progress status.")
101-
debug = traits.Bool(argstr='-debug', position=1, desc="Display debugging messages.")
97+
sep=' ', position=2, minlen=2,
98+
maxlen=2,
99+
desc=('Requires two values (i.e. [34 '
100+
'1] for [Slice Volume] Ignores '
101+
'the image slices specified '
102+
'when computing the tensor. '
103+
'Slice here means the z '
104+
'coordinate of the slice to be '
105+
'ignored.'))
106+
ignore_volumes = traits.List(traits.Int, argstr='-ignorevolumes %s',
107+
sep=' ', position=2, minlen=1,
108+
desc=('Requires two values (i.e. [2 5 6] for '
109+
'[Volumes] Ignores the image volumes '
110+
'specified when computing the tensor.'))
111+
quiet = traits.Bool(argstr='-quiet', position=1,
112+
desc=("Do not display information messages or progress "
113+
"status."))
114+
debug = traits.Bool(argstr='-debug', position=1,
115+
desc="Display debugging messages.")
116+
102117

103118
class DWI2TensorOutputSpec(TraitedSpec):
104-
tensor = File(exists=True, desc='path/name of output diffusion tensor image')
119+
tensor = File(exists=True,
120+
desc='path/name of output diffusion tensor image')
121+
105122

106123
class DWI2Tensor(CommandLine):
107124
"""

nipype/interfaces/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class RenameInputSpec(DynamicTraitedSpec):
150150
"template"))
151151
parse_string = traits.String(desc=("Python regexp parse string to define "
152152
"replacement inputs"))
153-
use_fullpath = traits.Bool(False, use_default=True,
153+
use_fullpath = traits.Bool(False, usedefault=True,
154154
desc="Use full path as input to regex parser")
155155

156156

tools/checkspecs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def test_specs(self, uri):
179179
'copyfile', 'usedefault', 'sep', 'hash_files',
180180
'deprecated', 'new_name', 'min_ver', 'max_ver',
181181
'name_source', 'name_template', 'keep_extension',
182-
'units']
182+
'units', 'output_name']
183183
in_built = ['type', 'copy', 'parent', 'instance_handler',
184184
'comparison_mode', 'array', 'default', 'editor']
185185
bad_specs = []

0 commit comments

Comments
 (0)