(self, sep)
return raw
Set the output raw exception section

        :param sep: the separator of current style
Set the output raw exception section
Set the output raw exception section
def _set_raw_raise(self, sep):
        """Set the output raw exception section

        :param sep: the separator of current style

        """
        raw = ''
        if self.dst.style['out'] == 'numpydoc':
            if 'raise' not in self.dst.numpydoc.get_excluded_sections():
                raw += '\n'
                if 'raise' in self.dst.numpydoc.get_mandatory_sections() or \
                        (self.docs['out']['raises'] and 'raise' in self.dst.numpydoc.get_optional_sections()):
                    spaces = ' ' * 4
                    with_space = lambda s: '\n'.join([self.docs['out']['spaces'] + spaces + l.lstrip() if i > 0 else l for i, l in enumerate(s.splitlines())])
                    raw += self.dst.numpydoc.get_key_section_header('raise', self.docs['out']['spaces'])
                    if len(self.docs['out']['raises']):
                        for p in self.docs['out']['raises']:
                            raw += self.docs['out']['spaces'] + p[0] + '\n'
                            raw += self.docs['out']['spaces'] + spaces + with_space(p[1]).strip() + '\n'
                    raw += '\n'
        elif self.dst.style['out'] == 'google':
            if 'raise' not in self.dst.googledoc.get_excluded_sections():
                raw += '\n'
                if 'raise' in self.dst.googledoc.get_mandatory_sections() or \
                        (self.docs['out']['raises'] and 'raise' in self.dst.googledoc.get_optional_sections()):
                    spaces = ' ' * 2
                    with_space = lambda s: '\n'.join([self.docs['out']['spaces'] + spaces + \
                                                            l.lstrip() if i > 0 else \
                                                            l for i, l in enumerate(s.splitlines())])
                    raw += self.dst.googledoc.get_key_section_header('raise', self.docs['out']['spaces'])
                    if len(self.docs['out']['raises']):
                        for p in self.docs['out']['raises']:
                            raw += self.docs['out']['spaces'] + spaces
                            if p[0] is not None:
                                raw += p[0] + sep
                            if p[1]:
                                raw += p[1].strip()
                            raw += '\n'
                    raw += '\n'
        elif self.dst.style['out'] == 'groups':
            pass
        else:
            with_space = lambda s: '\n'.join([self.docs['out']['spaces'] + l if i > 0 else l for i, l in enumerate(s.splitlines())])
            if len(self.docs['out']['raises']):
                if not self.docs['out']['params'] and not self.docs['out']['return']:
                    raw += '\n'
                for p in self.docs['out']['raises']:
                    raw += self.docs['out']['spaces'] + self.dst.get_key('raise', 'out') + ' '
                    if p[0] is not None:
                        raw += p[0] + sep
                    if p[1]:
                        raw += with_space(p[1]).strip()
                    raw += '\n'
            raw += '\n'
        return raw
def _set_raw_raise ( self , sep ) : raw = '' if self . dst . style [ 'out' ] == 'numpydoc' : if 'raise' not in self . dst . numpydoc . get_excluded_sections ( ) : raw += '\n' if 'raise' in self . dst . numpydoc . get_mandatory_sections ( ) or ( self . docs [ 'out' ] [ 'raises' ] and 'raise' in self . dst . numpydoc . get_optional_sections ( ) ) : spaces = ' ' * 4 with_space = lambda s : '\n' . join ( [ self . docs [ 'out' ] [ 'spaces' ] + spaces + l . lstrip ( ) if i > 0 else l for i , l in enumerate ( s . splitlines ( ) ) ] ) raw += self . dst . numpydoc . get_key_section_header ( 'raise' , self . docs [ 'out' ] [ 'spaces' ] ) if len ( self . docs [ 'out' ] [ 'raises' ] ) : for p in self . docs [ 'out' ] [ 'raises' ] : raw += self . docs [ 'out' ] [ 'spaces' ] + p [ 0 ] + '\n' raw += self . docs [ 'out' ] [ 'spaces' ] + spaces + with_space ( p [ 1 ] ) . strip ( ) + '\n' raw += '\n' elif self . dst . style [ 'out' ] == 'google' : if 'raise' not in self . dst . googledoc . get_excluded_sections ( ) : raw += '\n' if 'raise' in self . dst . googledoc . get_mandatory_sections ( ) or ( self . docs [ 'out' ] [ 'raises' ] and 'raise' in self . dst . googledoc . get_optional_sections ( ) ) : spaces = ' ' * 2 with_space = lambda s : '\n' . join ( [ self . docs [ 'out' ] [ 'spaces' ] + spaces + l . lstrip ( ) if i > 0 else l for i , l in enumerate ( s . splitlines ( ) ) ] ) raw += self . dst . googledoc . get_key_section_header ( 'raise' , self . docs [ 'out' ] [ 'spaces' ] ) if len ( self . docs [ 'out' ] [ 'raises' ] ) : for p in self . docs [ 'out' ] [ 'raises' ] : raw += self . docs [ 'out' ] [ 'spaces' ] + spaces if p [ 0 ] is not None : raw += p [ 0 ] + sep if p [ 1 ] : raw += p [ 1 ] . strip ( ) raw += '\n' raw += '\n' elif self . dst . style [ 'out' ] == 'groups' : pass else : with_space = lambda s : '\n' . join ( [ self . docs [ 'out' ] [ 'spaces' ] + l if i > 0 else l for i , l in enumerate ( s . splitlines ( ) ) ] ) if len ( self . docs [ 'out' ] [ 'raises' ] ) : if not self . docs [ 'out' ] [ 'params' ] and not self . docs [ 'out' ] [ 'return' ] : raw += '\n' for p in self . docs [ 'out' ] [ 'raises' ] : raw += self . docs [ 'out' ] [ 'spaces' ] + self . dst . get_key ( 'raise' , 'out' ) + ' ' if p [ 0 ] is not None : raw += p [ 0 ] + sep if p [ 1 ] : raw += with_space ( p [ 1 ] ) . strip ( ) raw += '\n' raw += '\n' return raw