Skip to content

Commit 1ee9b71

Browse files
committed
deprecated version should be a string, added AFNITraitedSpec for
backward compatibility
1 parent 5286b08 commit 1ee9b71

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

nipype/interfaces/afni/base.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def standard_image(img_name):
9999
class AFNIBaseCommandInputSpec(CommandLineInputSpec):
100100
outputtype = traits.Enum('AFNI', Info.ftypes.keys(),
101101
desc='AFNI output filetype')
102+
103+
class AFNITraitedSpec(AFNIBaseCommandInputSpec):
104+
pass
102105

103106

104107
class AFNIBaseCommand(CommandLine):
@@ -108,11 +111,12 @@ class AFNIBaseCommand(CommandLine):
108111

109112
input_spec = AFNIBaseCommandInputSpec
110113
_outputtype = None
114+
111115

112116
def __init__(self, **inputs):
113117
super(AFNIBaseCommand, self).__init__(**inputs)
114118
self.inputs.on_trait_change(self._output_update, 'outputtype')
115-
119+
116120
if self._outputtype is None:
117121
self._outputtype = Info.outputtype()
118122

@@ -190,9 +194,9 @@ class AFNICommandInputSpec(AFNIBaseCommandInputSpec):
190194
out_file = File("%s_afni", desc='output image file name',
191195
argstr='-prefix %s', xor=['out_file', 'prefix', 'suffix'], name_source="in_file", usedefault=True)
192196
prefix = traits.Str(
193-
desc='output image prefix', deprecated=0.8, new_name="out_file")
197+
desc='output image prefix', deprecated='0.8', new_name="out_file")
194198
suffix = traits.Str(
195-
desc='output image suffix', deprecated=0.8, new_name="out_file")
199+
desc='output image suffix', deprecated='0.8', new_name="out_file")
196200

197201

198202
class AFNICommand(AFNIBaseCommand):

nipype/interfaces/afni/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class To3DInputSpec(AFNICommandInputSpec):
3838
position=-1,
3939
mandatory=True,
4040
exists=True,
41-
deprecated=0.8,
41+
deprecated='0.8',
4242
new_name="in_folder",
4343
xor=in_xor)
4444

0 commit comments

Comments
 (0)