#NEWLINE# def print_alias_help( self ) : #NEWLINE# #INDENT# 'Print the alias part of the help.' #NEWLINE# if ( not self . aliases ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# lines = [ ] #NEWLINE# classdict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for cls in self . classes : #NEWLINE# #INDENT# for c in cls . mro ( ) [ : ( - 3 ) ] : #NEWLINE# #INDENT# classdict [ c . __name__ ] = c #NEWLINE# #UNINDENT# #UNINDENT# for ( alias , longname ) in self . aliases . items ( ) : #NEWLINE# #INDENT# ( classname , traitname ) = longname . split ( '.' , 1 ) #NEWLINE# cls = classdict [ classname ] #NEWLINE# trait = cls . class_traits ( config = True ) [ traitname ] #NEWLINE# help = cls . class_get_trait_help ( trait ) . splitlines ( ) #NEWLINE# help [ 0 ] = ( help [ 0 ] . replace ( longname , alias ) + ( ' (%s)' % longname ) ) #NEWLINE# lines . extend ( help ) #NEWLINE# #UNINDENT# print ( os . linesep . join ( lines ) )