Skip to content

Commit b25c202

Browse files
author
Ben Cipollini
committed
BF: use traits.Str (py2/3 compat) instead of traits.Unicode.
1 parent 89a2036 commit b25c202

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
class MRISPreprocInputSpec(FSTraitedSpec):
2424
out_file = File(argstr='--out %s', genfile=True,
2525
desc='output filename')
26-
target = traits.Unicode(argstr='--target %s', mandatory=True,
26+
target = traits.Str(argstr='--target %s', mandatory=True,
2727
desc='target subject name')
2828
hemi = traits.Enum('lh', 'rh', argstr='--hemi %s',
2929
mandatory=True,
3030
desc='hemisphere for source and target')
31-
surf_measure = traits.Unicode(argstr='--meas %s',
31+
surf_measure = traits.Str(argstr='--meas %s',
3232
xor=('surf_measure', 'surf_measure_file', 'surf_area'),
3333
desc='Use subject/surf/hemi.surf_measure as input')
34-
surf_area = traits.Unicode(argstr='--area %s',
34+
surf_area = traits.Str(argstr='--area %s',
3535
xor=('surf_measure', 'surf_measure_file', 'surf_area'),
3636
desc='Extract vertex area from subject/surf/hemi.surfname to use as input.')
3737
subjects = traits.List(argstr='--s %s...',
@@ -46,8 +46,8 @@ class MRISPreprocInputSpec(FSTraitedSpec):
4646
surf_measure_file = InputMultiPath(File(exists=True), argstr='--is %s...',
4747
xor=('surf_measure', 'surf_measure_file', 'surf_area'),
4848
desc='file alternative to surfmeas, still requires list of subjects')
49-
source_format = traits.Unicode(argstr='--srcfmt %s', desc='source format')
50-
surf_dir = traits.Unicode(argstr='--surfdir %s',
49+
source_format = traits.Str(argstr='--srcfmt %s', desc='source format')
50+
surf_dir = traits.Str(argstr='--surfdir %s',
5151
desc='alternative directory (instead of surf)')
5252
vol_measure_file = InputMultiPath(traits.Tuple(File(exists=True),
5353
File(exists=True)),
@@ -114,7 +114,7 @@ def _gen_filename(self, name):
114114

115115

116116
class GLMFitInputSpec(FSTraitedSpec):
117-
glm_dir = traits.Unicode(argstr='--glmdir %s', desc='save outputs to dir',
117+
glm_dir = traits.Str(argstr='--glmdir %s', desc='save outputs to dir',
118118
genfile=True)
119119
in_file = File(desc='input 4D file', argstr='--y %s', mandatory=True,
120120
copyfile=False)
@@ -190,12 +190,12 @@ class GLMFitInputSpec(FSTraitedSpec):
190190
surf = traits.Bool(argstr="--surf %s %s %s",
191191
requires=["subject_id", "hemi"],
192192
desc="analysis is on a surface mesh")
193-
subject_id = traits.Unicode(desc="subject id for surface geometry")
193+
subject_id = traits.Str(desc="subject id for surface geometry")
194194
hemi = traits.Enum("lh", "rh", desc="surface hemisphere")
195-
surf_geo = traits.Unicode("white", usedefault=True,
195+
surf_geo = traits.Str("white", usedefault=True,
196196
desc="surface geometry name (e.g. white, pial)")
197197
simulation = traits.Tuple(traits.Enum('perm', 'mc-full', 'mc-z'),
198-
traits.Int(min=1), traits.Float, traits.Unicode,
198+
traits.Int(min=1), traits.Float, traits.Str,
199199
argstr='--sim %s %d %f %s',
200200
desc='nulltype nsim thresh csdbasename')
201201
sim_sign = traits.Enum('abs', 'pos', 'neg', argstr='--sim-sign %s',
@@ -544,11 +544,11 @@ class SegStatsInputSpec(FSTraitedSpec):
544544
_xor_inputs = ('segmentation_file', 'annot', 'surf_label')
545545
segmentation_file = File(exists=True, argstr='--seg %s', xor=_xor_inputs,
546546
mandatory=True, desc='segmentation volume path')
547-
annot = traits.Tuple(traits.Unicode, traits.Enum('lh', 'rh'), traits.Unicode,
547+
annot = traits.Tuple(traits.Str, traits.Enum('lh', 'rh'), traits.Str,
548548
argstr='--annot %s %s %s', xor=_xor_inputs,
549549
mandatory=True,
550550
desc='subject hemi parc : use surface parcellation')
551-
surf_label = traits.Tuple(traits.Unicode, traits.Enum('lh', 'rh'), traits.Unicode,
551+
surf_label = traits.Tuple(traits.Str, traits.Enum('lh', 'rh'), traits.Str,
552552
argstr='--slabel %s %s %s', xor=_xor_inputs,
553553
mandatory=True,
554554
desc='subject hemi label : use surface label')
@@ -716,11 +716,11 @@ class Label2VolInputSpec(FSTraitedSpec):
716716
argstr='--proj %s %f %f %f',
717717
requires=('subject_id', 'hemi'),
718718
desc='project along surface normal')
719-
subject_id = traits.Unicode(argstr='--subject %s',
719+
subject_id = traits.Str(argstr='--subject %s',
720720
desc='subject id')
721721
hemi = traits.Enum('lh', 'rh', argstr='--hemi %s',
722722
desc='hemisphere to use lh or rh')
723-
surface = traits.Unicode(argstr='--surf %s',
723+
surface = traits.Str(argstr='--surf %s',
724724
desc='use surface instead of white')
725725
vol_label_file = File(argstr='--o %s', genfile=True,
726726
desc='output volume')

nipype/interfaces/fsl/epi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ class EddyInputSpec(FSLCommandInputSpec):
397397
in_bval = File(exists=True, mandatory=True, argstr='--bvals=%s',
398398
desc=('File containing the b-values for all volumes in '
399399
'--imain'))
400-
out_base = traits.Unicode('eddy_corrected', argstr='--out=%s',
400+
out_base = traits.Str('eddy_corrected', argstr='--out=%s',
401401
usedefault=True,
402402
desc=('basename for output (warped) image'))
403403
session = File(exists=True, argstr='--session=%s',

0 commit comments

Comments
 (0)