<s> """<STR_LIT>""" <EOL> from concurrent . futures import ThreadPoolExecutor <EOL> class Executor : <EOL> def __init__ ( self , client ) : <EOL> self . client = client <EOL> self . pool = ThreadPoolExecutor ( <NUM_LIT:2> ) <EOL> def login ( self , username , password ) : <EOL> return self . pool . submit ( self . client . login , username , password ) <EOL> def projects ( self ) : <EOL> return self . pool . submit ( self . client . get_projects ) <EOL> def project_detail ( self , project ) : <EOL> return self . pool . submit ( self . client . get_project , id = project [ "<STR_LIT:id>" ] ) <EOL> def project_stats ( self , project ) : <EOL> return self . pool . submit ( self . client . get_project_stats , id = project [ "<STR_LIT:id>" ] ) <EOL> def project_issues_stats ( self , project ) : <EOL> return self . pool . submit ( self . client . get_project_issues_stats , id = project [ "<STR_LIT:id>" ] ) <EOL> def milestone ( self , milestone , project ) : <EOL> params = { "<STR_LIT>" : project [ "<STR_LIT:id>" ] } <EOL> return self . pool . submit ( self . client . get_milestone , id = milestone [ "<STR_LIT:id>" ] , params = params ) <EOL> def milestone_stats ( self , milestone , project ) : <EOL> params = { "<STR_LIT>" : project [ "<STR_LIT:id>" ] } <EOL> return self . pool . submit ( self . client . get_milestone_stats , id = milestone [ "<STR_LIT:id>" ] , params = params ) <EOL> def create_user_story ( self , data ) : <EOL> return self . pool . submit ( self . client . create_user_story , data_dict = data ) <EOL> def create_user_stories_in_bulk ( self , data ) : <EOL> return self . pool . submit ( self . client . create_user_stories_in_bulk , data_dict = data ) <EOL> def update_user_story ( self , user_story , data ) : <EOL> return self . pool . submit ( self . client . update_user_story , id = user_story [ "<STR_LIT:id>" ] , data_dict = data ) <EOL> def delete_user_story ( self , user_story ) : <EOL> return self . pool . submit ( self . client . delete_user_story , id = user_story [ "<STR_LIT:id>" ] ) <EOL> def update_user_stories_order ( self , user_stories , project ) : <EOL> data = { <EOL> "<STR_LIT>" : project [ "<STR_LIT:id>" ] , <EOL> "<STR_LIT>" : [ [ v [ "<STR_LIT:id>" ] , i ] for i , v in enumerate ( user_stories ) ] <EOL> } <EOL> return self . pool . submit ( self . client . update_user_stories_order , data_dict = data ) <EOL> def unassigned_user_stories ( self , project ) : <EOL> params = { <EOL> "<STR_LIT>" : project [ "<STR_LIT:id>" ] , <EOL> "<STR_LIT>" : None <EOL> } <EOL> return self . pool . submit ( self . client . get_user_stories , params = params ) <EOL> def user_stories ( self , milestone , project ) : <EOL> params = { <EOL> "<STR_LIT>" : project [ "<STR_LIT:id>" ] , <EOL> "<STR_LIT>" : milestone [ "<STR_LIT:id>" ] <EOL> } <EOL> return self . pool . submit ( self . client . get_user_stories , params = params ) <EOL> def tasks ( self , milestone , project ) : <EOL> params = { <EOL> "<STR_LIT>" : project [ "<STR_LIT:id>" ] , <EOL> "<STR_LIT>" : milestone [ "<STR_LIT:id>" ] <EOL> } <EOL> return self . pool . submit ( self . client . get_tasks , params = params ) <EOL> def create_task ( self , data ) : <EOL> return self . pool . submit ( self . client . create_task , data_dict = data ) <EOL> def update_task ( self , task , data ) : <EOL> return self . pool . submit ( self . client . update_task , id = task [ "<STR_LIT:id>" ] , data_dict = data ) <EOL> def delete_task ( self , task ) : <EOL> return self . pool . submit ( self . client . delete_task , id = task [ "<STR_LIT:id>" ] ) <EOL> def issues ( self , project , order_by = [ ] , filters = { } ) : <EOL> params = { "<STR_LIT>" : project [ "<STR_LIT:id>" ] } <EOL> if order_by : <EOL> params [ "<STR_LIT>" ] = "<STR_LIT:U+002CU+0020>" . join ( order_by ) <EOL> if filters : <EOL> params . update ( filters ) <EOL> return self . pool . submit ( self . client . get_issues , params = params ) <EOL> def create_issue ( self , data ) : <EOL> return self . pool . submit ( self . client . create_issue , data_dict = data ) <EOL> def update_issue ( self , issue , data ) : <EOL> return self . pool . submit ( self . client . update_issue , id = issue [ "<STR_LIT:id>" ] , data_dict = data ) <EOL> def delete_issue ( self , issue ) : <EOL> return self . pool . submit ( self . client . delete_issue , id = issue [ "<STR_LIT:id>" ] ) <EOL> def wiki_pages ( self , project ) : <EOL> params = { "<STR_LIT>" : project [ "<STR_LIT:id>" ] } <EOL> return self . pool . submit ( self . client . get_wiki_pages , params = params ) </s>
