(self)
Sets the return parameter with description and rtype if any
Sets the return parameter with description and rtype if any
Sets the return parameter with description and rtype if any
def _set_return(self):
        """Sets the return parameter with description and rtype if any"""
        # TODO: manage return retrieved from element code (external)
        # TODO: manage different in/out styles
        if type(self.docs['in']['return']) is list and self.dst.style['out'] not in ['groups', 'numpydoc', 'google']:
            # TODO: manage return names
            # manage not setting return if not mandatory for numpy
            lst = self.docs['in']['return']
            if lst:
                if lst[0][0] is not None:
                    self.docs['out']['return'] = "%s-> %s" % (lst[0][0], lst[0][1])
                else:
                    self.docs['out']['return'] = lst[0][1]
                self.docs['out']['rtype'] = lst[0][2]
        else:
            self.docs['out']['return'] = self.docs['in']['return']
            self.docs['out']['rtype'] = self.docs['in']['rtype']
        if (self._options['hint_rtype_priority'] or not self.docs['out']['rtype']) and self.element['rtype']:
            self.docs['out']['rtype'] = self.element['rtype']
def _set_return ( self ) : # TODO: manage return retrieved from element code (external) # TODO: manage different in/out styles if type ( self . docs [ 'in' ] [ 'return' ] ) is list and self . dst . style [ 'out' ] not in [ 'groups' , 'numpydoc' , 'google' ] : # TODO: manage return names # manage not setting return if not mandatory for numpy lst = self . docs [ 'in' ] [ 'return' ] if lst : if lst [ 0 ] [ 0 ] is not None : self . docs [ 'out' ] [ 'return' ] = "%s-> %s" % ( lst [ 0 ] [ 0 ] , lst [ 0 ] [ 1 ] ) else : self . docs [ 'out' ] [ 'return' ] = lst [ 0 ] [ 1 ] self . docs [ 'out' ] [ 'rtype' ] = lst [ 0 ] [ 2 ] else : self . docs [ 'out' ] [ 'return' ] = self . docs [ 'in' ] [ 'return' ] self . docs [ 'out' ] [ 'rtype' ] = self . docs [ 'in' ] [ 'rtype' ] if ( self . _options [ 'hint_rtype_priority' ] or not self . docs [ 'out' ] [ 'rtype' ] ) and self . element [ 'rtype' ] : self . docs [ 'out' ] [ 'rtype' ] = self . element [ 'rtype' ]