(self)
Sets the output raw docstring
Sets the output raw docstring
Sets the output raw docstring
def _set_raw(self):
        """Sets the output raw docstring"""
        sep = self.dst.get_sep(target='out')
        sep = sep + ' ' if sep != ' ' else sep
        with_space = lambda s: '\n'.join([self.docs['out']['spaces'] + l if i > 0 else l for i, l in enumerate(s.splitlines())])

        # sets the description section
        raw = self.docs['out']['spaces'] + self.before_lim + self.quotes
        desc = self.docs['out']['desc'].strip()
        if not desc or not desc.count('\n'):
            if not self.docs['out']['params'] and not self.docs['out']['return'] and not self.docs['out']['rtype'] and not self.docs['out']['raises']:
                raw += desc if desc else self.trailing_space
                raw += self.quotes
                self.docs['out']['raw'] = raw.rstrip()
                return
        if not self.first_line:
            raw += '\n' + self.docs['out']['spaces']
        raw += with_space(self.docs['out']['desc']).strip() + '\n'

        # sets the parameters section
        raw += self._set_raw_params(sep)

        # sets the return section
        raw += self._set_raw_return(sep)

        # sets the raises section
        raw += self._set_raw_raise(sep)

        # sets post specific if any
        if 'post' in self.docs['out']:
            raw += self.docs['out']['spaces'] + with_space(self.docs['out']['post']).strip() + '\n'

        # sets the doctests if any
        if 'doctests' in self.docs['out']:
            raw += self.docs['out']['spaces'] + with_space(self.docs['out']['doctests']).strip() + '\n'

        if raw.count(self.quotes) == 1:
            raw += self.docs['out']['spaces'] + self.quotes
        self.docs['out']['raw'] = raw.rstrip()
def _set_raw ( self ) : sep = self . dst . get_sep ( target = 'out' ) sep = sep + ' ' if sep != ' ' else sep with_space = lambda s : '\n' . join ( [ self . docs [ 'out' ] [ 'spaces' ] + l if i > 0 else l for i , l in enumerate ( s . splitlines ( ) ) ] ) # sets the description section raw = self . docs [ 'out' ] [ 'spaces' ] + self . before_lim + self . quotes desc = self . docs [ 'out' ] [ 'desc' ] . strip ( ) if not desc or not desc . count ( '\n' ) : if not self . docs [ 'out' ] [ 'params' ] and not self . docs [ 'out' ] [ 'return' ] and not self . docs [ 'out' ] [ 'rtype' ] and not self . docs [ 'out' ] [ 'raises' ] : raw += desc if desc else self . trailing_space raw += self . quotes self . docs [ 'out' ] [ 'raw' ] = raw . rstrip ( ) return if not self . first_line : raw += '\n' + self . docs [ 'out' ] [ 'spaces' ] raw += with_space ( self . docs [ 'out' ] [ 'desc' ] ) . strip ( ) + '\n' # sets the parameters section raw += self . _set_raw_params ( sep ) # sets the return section raw += self . _set_raw_return ( sep ) # sets the raises section raw += self . _set_raw_raise ( sep ) # sets post specific if any if 'post' in self . docs [ 'out' ] : raw += self . docs [ 'out' ] [ 'spaces' ] + with_space ( self . docs [ 'out' ] [ 'post' ] ) . strip ( ) + '\n' # sets the doctests if any if 'doctests' in self . docs [ 'out' ] : raw += self . docs [ 'out' ] [ 'spaces' ] + with_space ( self . docs [ 'out' ] [ 'doctests' ] ) . strip ( ) + '\n' if raw . count ( self . quotes ) == 1 : raw += self . docs [ 'out' ] [ 'spaces' ] + self . quotes self . docs [ 'out' ] [ 'raw' ] = raw . rstrip ( )