<s> from robotide import robotapi <EOL> from robotide . spec . iteminfo import LibraryKeywordInfo <EOL> def get_import_result ( path , args ) : <EOL> lib = robotapi . TestLibrary ( path , args ) <EOL> kws = [ <EOL> LibraryKeywordInfo ( <EOL> kw . name , <EOL> kw . doc , <EOL> kw . library . name , <EOL> _parse_args ( kw . arguments ) <EOL> ) for kw in lib . handlers ] <EOL> return kws <EOL> def _parse_args ( args ) : <EOL> parsed = [ ] <EOL> if args . positional : <EOL> parsed . extend ( list ( args . positional ) ) <EOL> if args . defaults : <EOL> for i , value in enumerate ( args . defaults ) : <EOL> index = len ( args . positional ) - len ( args . defaults ) + i <EOL> parsed [ index ] = parsed [ index ] + '<STR_LIT:=>' + unicode ( value ) <EOL> if args . varargs : <EOL> parsed . append ( '<STR_LIT>' % args . varargs ) <EOL> if args . kwargs : <EOL> parsed . append ( '<STR_LIT>' % args . kwargs ) <EOL> return parsed </s>
