From f59525c381def60ab05827ef173149eff2bef02c Mon Sep 17 00:00:00 2001 From: Alexandre Manhaes Savio Date: Thu, 18 Feb 2016 11:30:29 +0100 Subject: [PATCH] cleanup identityinterface add_outputs --- nipype/interfaces/utility.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nipype/interfaces/utility.py b/nipype/interfaces/utility.py index 37883d4e5c..c93081409c 100644 --- a/nipype/interfaces/utility.py +++ b/nipype/interfaces/utility.py @@ -76,12 +76,7 @@ def __init__(self, fields=None, mandatory_inputs=True, **inputs): self.inputs.set(**inputs) def _add_output_traits(self, base): - undefined_traits = {} - for key in self._fields: - base.add_trait(key, traits.Any) - undefined_traits[key] = Undefined - base.trait_set(trait_change_notify=False, **undefined_traits) - return base + return add_traits(base, self._fields) def _list_outputs(self): # manual mandatory inputs check