<s> """<STR_LIT>""" <EOL> import pkg_resources <EOL> import cliff . commandmanager <EOL> class CommandManager ( cliff . commandmanager . CommandManager ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , namespace , convert_underscores = True ) : <EOL> self . group_list = [ ] <EOL> super ( CommandManager , self ) . __init__ ( namespace , convert_underscores ) <EOL> def load_commands ( self , namespace ) : <EOL> self . group_list . append ( namespace ) <EOL> return super ( CommandManager , self ) . load_commands ( namespace ) <EOL> def add_command_group ( self , group = None ) : <EOL> """<STR_LIT>""" <EOL> if group : <EOL> self . load_commands ( group ) <EOL> def get_command_groups ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . group_list <EOL> def get_command_names ( self , group = None ) : <EOL> """<STR_LIT>""" <EOL> group_list = [ ] <EOL> if group is not None : <EOL> for ep in pkg_resources . iter_entry_points ( group ) : <EOL> cmd_name = ( <EOL> ep . name . replace ( '<STR_LIT:_>' , '<STR_LIT:U+0020>' ) <EOL> if self . convert_underscores <EOL> else ep . name <EOL> ) <EOL> group_list . append ( cmd_name ) <EOL> return group_list <EOL> return list ( self . commands . keys ( ) ) </s>
