#NEWLINE# @ staticmethod #NEWLINE# def compute_metavar( kwargs ) : #NEWLINE# #INDENT# 'Compute the metavar to display in help for an option registered with these kwargs.' #NEWLINE# metavar = kwargs . get ( 'metavar' ) #NEWLINE# if ( not metavar ) : #NEWLINE# #INDENT# typ = kwargs . get ( 'type' , str ) #NEWLINE# if ( typ == list ) : #NEWLINE# #INDENT# typ = kwargs . get ( 'member_type' , str ) #NEWLINE# #UNINDENT# if ( typ == dict ) : #NEWLINE# #INDENT# metavar = '"{\'key1\':val1,\'key2\':val2,...}"' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# metavar = '<{}>' . format ( typ . __name__ ) #NEWLINE# #UNINDENT# #UNINDENT# return metavar