#NEWLINE# def parse_names_and_default( self ) : #NEWLINE# #INDENT# "parse for `parse_content`\n        {title: [('-a, --all=STH', 'default'), ...]}" #NEWLINE# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( title , text ) in self . formal_content . items ( ) : #NEWLINE# #INDENT# if ( not text ) : #NEWLINE# #INDENT# result [ title ] = [ ] #NEWLINE# continue #NEWLINE# #UNINDENT# logger . debug ( ( '\n' + text ) ) #NEWLINE# collect = [ ] #NEWLINE# to_list = text . splitlines ( ) #NEWLINE# previous_line = to_list . pop ( 0 ) #NEWLINE# collect . append ( self . parse_line_option_indent ( previous_line ) ) #NEWLINE# for line in to_list : #NEWLINE# #INDENT# indent_match = self . indent_re . match ( line ) #NEWLINE# this_indent = len ( indent_match . groupdict ( ) [ 'indent' ] ) #NEWLINE# if ( this_indent >= collect [ ( - 1 ) ] [ 'indent' ] ) : #NEWLINE# #INDENT# previous_line = line #NEWLINE# continue #NEWLINE# #UNINDENT# collect [ ( - 1 ) ] [ 'default' ] = self . parse_default ( previous_line ) #NEWLINE# collect . append ( self . parse_line_option_indent ( line ) ) #NEWLINE# logger . debug ( collect [ ( - 1 ) ] ) #NEWLINE# previous_line = line #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# collect [ ( - 1 ) ] [ 'default' ] = self . parse_default ( previous_line ) #NEWLINE# #UNINDENT# result [ title ] = [ ( each [ 'option' ] , each [ 'default' ] ) for each in collect ] #NEWLINE# #UNINDENT# return result