@@ -306,34 +306,33 @@ def user_find_by_user_string(self, username, start=0, limit=50, include_inactive
306306 }
307307 return self .get (url , params = params )
308308
309- def is_user_in_application (self , username , applicationKey ):
309+ def is_user_in_application (self , username , application_key ):
310310 """
311311 Utility function to test whether a user has an application role
312312 :param username: The username of the user to test.
313- :param applicationKey : The application key of the application
313+ :param application_key : The application key of the application
314314 :return: True if the user has the application, else False
315315 """
316316 user = self .user (username , 'applicationRoles' ) # Get applications roles of the user
317317 if 'self' in user :
318- for applicationRole in user .get ('applicationRoles' ).get ('items' ):
319- if applicationRole .get ('key' ) == applicationKey :
318+ for application_role in user .get ('applicationRoles' ).get ('items' ):
319+ if application_role .get ('key' ) == application_key :
320320 return True
321-
322321 return False
323322
324- def add_user_to_application (self , username , applicationKey ):
323+ def add_user_to_application (self , username , application_key ):
325324 """
326325 Add a user to an application
327326 :param username: The username of the user to add.
328- :param applicationKey : The application key of the application
327+ :param application_key : The application key of the application
329328 :return: True if the user was added to the application, else False
330329 :see: https://docs.atlassian.com/software/jira/docs/api/REST/7.5.3/#api/2/user-addUserToApplication
331330 """
332331 params = {
333332 'username' : username ,
334- 'applicationKey' : applicationKey
333+ 'applicationKey' : application_key
335334 }
336- return self .post ('rest/api/2/user/application' , params = params ) == None
335+ return self .post ('rest/api/2/user/application' , params = params ) is None
337336
338337 # Application roles
339338 def get_all_application_roles (self ):
@@ -2071,10 +2070,9 @@ def tempo_teams_add_member(self, team_id, member_key):
20712070 :return:
20722071 """
20732072 data = {"member" : {"key" : str (member_key ), "type" : "USER" },
2074- "membership" : {
2075- "availability" : "100" ,
2076- "role" : {"id" : 1 }
2077- }}
2073+ "membership" : {"availability" : "100" ,
2074+ "role" : {"id" : 1 }}
2075+ }
20782076 return self .tempo_teams_add_member_raw (team_id , member_data = data )
20792077
20802078 def tempo_teams_add_membership (self , team_id , member_id ):
0 commit comments