Skip to content

Commit 5979cb8

Browse files
committed
refractoring w/ black...
1 parent b5246a8 commit 5979cb8

File tree

2 files changed

+20
-32
lines changed

2 files changed

+20
-32
lines changed

nipype/interfaces/mrtrix/convert.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ def track_gen(track_points):
121121
"Expecting %s points, found only %s" % (stream_count, n_streams)
122122
)
123123
iflogger.error(
124-
"Expecting %s points, found only %s", stream_count, n_streams
124+
"Expecting %s points, found only %s",
125+
stream_count,
126+
n_streams,
125127
)
126128
break
127129
pts = np.ndarray(shape=(n_pts, pt_cols), dtype=f4dt, buffer=pts_str)
@@ -193,7 +195,10 @@ class MRTrix2TrackVis(DipyBaseInterface):
193195
output_spec = MRTrix2TrackVisOutputSpec
194196

195197
def _run_interface(self, runtime):
196-
from dipy.tracking.utils import move_streamlines, affine_from_fsl_mat_file
198+
from dipy.tracking.utils import (
199+
move_streamlines,
200+
affine_from_fsl_mat_file,
201+
)
197202

198203
dx, dy, dz = get_data_dims(self.inputs.image_file)
199204
vx, vy, vz = get_vox_dims(self.inputs.image_file)
@@ -215,7 +220,8 @@ def _run_interface(self, runtime):
215220
self.inputs.registration_image_file
216221
):
217222
iflogger.info(
218-
"Applying transformation from matrix file %s", self.inputs.matrix_file
223+
"Applying transformation from matrix file %s",
224+
self.inputs.matrix_file,
219225
)
220226
xfm = np.genfromtxt(self.inputs.matrix_file)
221227
iflogger.info(xfm)

nipype/interfaces/mrtrix3/utils.py

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ class Generate5ttInputSpec(MRTrix3BaseInputSpec):
144144
position=-2,
145145
desc="input image",
146146
)
147-
out_file = File(
148-
argstr="%s", mandatory=True, position=-1, desc="output image"
149-
)
147+
out_file = File(argstr="%s", mandatory=True, position=-1, desc="output image")
150148

151149

152150
class Generate5ttOutputSpec(TraitedSpec):
@@ -192,12 +190,8 @@ class TensorMetricsInputSpec(CommandLineInputSpec):
192190

193191
out_fa = File(argstr="-fa %s", desc="output FA file")
194192
out_adc = File(argstr="-adc %s", desc="output ADC file")
195-
out_evec = File(
196-
argstr="-vector %s", desc="output selected eigenvector(s) file"
197-
)
198-
out_eval = File(
199-
argstr="-value %s", desc="output selected eigenvalue(s) file"
200-
)
193+
out_evec = File(argstr="-vector %s", desc="output selected eigenvector(s) file")
194+
out_eval = File(argstr="-value %s", desc="output selected eigenvalue(s) file")
201195
component = traits.List(
202196
[1],
203197
usedefault=True,
@@ -212,8 +206,7 @@ class TensorMetricsInputSpec(CommandLineInputSpec):
212206
exists=True,
213207
argstr="-mask %s",
214208
desc=(
215-
"only perform computation within the specified binary"
216-
" brain mask image"
209+
"only perform computation within the specified binary" " brain mask image"
217210
),
218211
)
219212
modulate = traits.Enum(
@@ -301,8 +294,7 @@ class ComputeTDIInputSpec(CommandLineInputSpec):
301294
)
302295
max_tod = traits.Int(
303296
argstr="-tod %d",
304-
desc="generate a Track Orientation "
305-
"Distribution (TOD) in each voxel.",
297+
desc="generate a Track Orientation " "Distribution (TOD) in each voxel.",
306298
)
307299

308300
contrast = traits.Enum(
@@ -392,8 +384,7 @@ class ComputeTDIInputSpec(CommandLineInputSpec):
392384
)
393385
nthreads = traits.Int(
394386
argstr="-nthreads %d",
395-
desc="number of threads. if zero, the number"
396-
" of available cpus will be used",
387+
desc="number of threads. if zero, the number" " of available cpus will be used",
397388
nohash=True,
398389
)
399390

@@ -498,8 +489,7 @@ class TCK2VTKInputSpec(CommandLineInputSpec):
498489

499490
nthreads = traits.Int(
500491
argstr="-nthreads %d",
501-
desc="number of threads. if zero, the number"
502-
" of available cpus will be used",
492+
desc="number of threads. if zero, the number" " of available cpus will be used",
503493
nohash=True,
504494
)
505495

@@ -543,9 +533,7 @@ class DWIExtractInputSpec(MRTrix3BaseInputSpec):
543533
position=-2,
544534
desc="input image",
545535
)
546-
out_file = File(
547-
argstr="%s", mandatory=True, position=-1, desc="output image"
548-
)
536+
out_file = File(argstr="%s", mandatory=True, position=-1, desc="output image")
549537
bzero = traits.Bool(argstr="-bzero", desc="extract b=0 volumes")
550538
nobzero = traits.Bool(argstr="-no_bzero", desc="extract non b=0 volumes")
551539
singleshell = traits.Bool(
@@ -690,9 +678,7 @@ class MRMathInputSpec(MRTrix3BaseInputSpec):
690678
position=-3,
691679
desc="input image",
692680
)
693-
out_file = File(
694-
argstr="%s", mandatory=True, position=-1, desc="output image"
695-
)
681+
out_file = File(argstr="%s", mandatory=True, position=-1, desc="output image")
696682
operation = traits.Enum(
697683
"mean",
698684
"median",
@@ -875,9 +861,7 @@ class SHConvInputSpec(CommandLineInputSpec):
875861

876862

877863
class SHConvOutputSpec(TraitedSpec):
878-
out_file = File(
879-
exists=True, desc="the output convoluted spherical harmonics file"
880-
)
864+
out_file = File(exists=True, desc="the output convoluted spherical harmonics file")
881865

882866

883867
class SHConv(CommandLine):
@@ -941,9 +925,7 @@ class SH2AmpInputSpec(CommandLineInputSpec):
941925

942926

943927
class SH2AmpOutputSpec(TraitedSpec):
944-
out_file = File(
945-
exists=True, desc="the output convoluted spherical harmonics file"
946-
)
928+
out_file = File(exists=True, desc="the output convoluted spherical harmonics file")
947929

948930

949931
class SH2Amp(CommandLine):

0 commit comments

Comments
 (0)