<s> from . import utils <EOL> def add ( client , args ) : <EOL> """<STR_LIT>""" <EOL> repository = utils . get_working_repo ( client , args . repository ) <EOL> collaborator = utils . get_named_user ( client , args . user ) <EOL> repository . add_to_collaborators ( collaborator ) <EOL> print ( '<STR_LIT>' ) <EOL> def remove ( client , args ) : <EOL> """<STR_LIT>""" <EOL> repository = utils . get_working_repo ( client , args . repository ) <EOL> collaborator = utils . get_named_user ( client , args . user ) <EOL> repository . remove_from_collaborators ( collaborator ) <EOL> print ( '<STR_LIT>' ) <EOL> def do_list ( client , args ) : <EOL> """<STR_LIT>""" <EOL> repository = utils . get_working_repo ( client , args . repository ) <EOL> collaborators = repository . get_collaborators ( ) <EOL> if not collaborators : <EOL> print ( '<STR_LIT>' % repository . full_name ) <EOL> else : <EOL> print ( '<STR_LIT>' % repository . full_name ) <EOL> for collaborator in collaborators : <EOL> print ( collaborator . login ) <EOL> def make_collab_parser ( subparsers ) : <EOL> collab = subparsers . add_parser ( '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> subparsers = collab . add_subparsers ( title = '<STR_LIT>' ) <EOL> subparsers . required = True <EOL> subparsers . dest = '<STR_LIT>' <EOL> collab_list = subparsers . add_parser ( '<STR_LIT:list>' , help = '<STR_LIT>' ) <EOL> collab_list . set_defaults ( func = do_list ) <EOL> collab_list . add_argument ( '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> collab_add = subparsers . add_parser ( '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> collab_add . set_defaults ( func = add ) <EOL> collab_add . add_argument ( '<STR_LIT:user>' , help = '<STR_LIT>' ) <EOL> collab_add . add_argument ( '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> collab_remove = subparsers . add_parser ( '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> collab_remove . set_defaults ( func = remove ) <EOL> collab_remove . add_argument ( '<STR_LIT:user>' , help = '<STR_LIT>' ) <EOL> collab_remove . add_argument ( '<STR_LIT>' , help = '<STR_LIT>' ) </s>
