#NEWLINE# @ classmethod #NEWLINE# def get_arg_descriptions_from_docstring( cls , obj ) : #NEWLINE# #INDENT# 'Returns an ordered map of arg name -> arg description found in :param: stanzas.' #NEWLINE# ret = OrderedDict ( ) #NEWLINE# name = '' #NEWLINE# doc = ( obj . __doc__ or '' ) #NEWLINE# lines = [ s . strip ( ) for s in doc . split ( '\n' ) ] #NEWLINE# stanza_first_line_re = cls . _get_stanza_first_line_re ( ) #NEWLINE# for line in lines : #NEWLINE# #INDENT# m = stanza_first_line_re . match ( line ) #NEWLINE# if ( m and ( m . group ( 1 ) == 'param' ) ) : #NEWLINE# #INDENT# ( name , description ) = m . group ( 3 , 4 ) #NEWLINE# ret [ name ] = description #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( m and ( m . group ( 1 ) != 'param' ) ) : #NEWLINE# #INDENT# name = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name and line ) : #NEWLINE# #INDENT# ret [ name ] += ( ( ' ' + line ) if stanza_first_line_re [ name ] else line ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ret