@@ -858,7 +858,7 @@ def _outputs_help(cls):
858
858
""" Prints description for output parameters
859
859
"""
860
860
helpstr = ['Outputs::' , '' ]
861
- if getattr ( cls , ' output_spec' , None ) is not None :
861
+ if cls . output_spec :
862
862
outputs = cls .output_spec ()
863
863
for name , spec in sorted (outputs .traits (transient = None ).items ()):
864
864
helpstr += cls ._get_trait_desc (outputs , name , spec )
@@ -870,7 +870,7 @@ def _outputs(self):
870
870
""" Returns a bunch containing output fields for the class
871
871
"""
872
872
outputs = None
873
- if getattr ( self , ' output_spec' , None ) is not None :
873
+ if self . output_spec :
874
874
outputs = self .output_spec ()
875
875
return outputs
876
876
@@ -1091,7 +1091,7 @@ def run(self, **inputs):
1091
1091
def _list_outputs (self ):
1092
1092
""" List the expected outputs
1093
1093
"""
1094
- if getattr ( self , ' output_spec' , None ) is not None :
1094
+ if self . output_spec :
1095
1095
raise NotImplementedError
1096
1096
else :
1097
1097
return None
@@ -1612,7 +1612,7 @@ def _overload_extension(self, value, name=None):
1612
1612
def _list_outputs (self ):
1613
1613
metadata = dict (name_source = lambda t : t is not None )
1614
1614
traits = self .inputs .traits (** metadata )
1615
- if traits and getattr ( self , 'output_spec' , None ) is not None :
1615
+ if traits :
1616
1616
outputs = self .output_spec ().get ()
1617
1617
for name , trait_spec in traits .items ():
1618
1618
out_name = name
0 commit comments