Skip to content

Commit 69e5038

Browse files
authored
Polish variables (#393)
* Rename variables and polish to be in PEP-8
1 parent 21f2bf1 commit 69e5038

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

atlassian/bamboo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ def get_vcs_branches(self, plan_key, max_results=25):
201201
:return:
202202
"""
203203
resource = 'plan/{plan_key}/vcsBranches'.format(plan_key=plan_key)
204-
return self.base_list_call(resource, start_index=0, max_results=max_results)
204+
return self.base_list_call(resource, start_index=0, max_results=max_results, clover_enabled=None, expand=None,
205+
favourite=None)
205206

206207
""" Build results """
207208

atlassian/bitbucket.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ def update_pull_request_comment(self, project, repository, pull_request_id, comm
815815
that must match the server's version of the comment
816816
or the update will fail.
817817
"""
818-
url = "rest/api/1.0/projects/{project}/repos/{repository}/pull-requests/{pull_request_id}/comments/{comment_id}".format(
819-
project=project, repository=repository, pull_request_id=pull_request_id, comment_id=comment_id
818+
url = 'rest/api/1.0/projects/{project}/repos/{repo}/pull-requests/{pull_request}/comments/{comment_id}'.format(
819+
project=project, repo=repository, pull_request=pull_request_id, comment_id=comment_id
820820
)
821821
payload = {
822822
"version": comment_version,
@@ -852,8 +852,8 @@ def change_reviewed_status(self, project_key, repository_slug, pull_request_id,
852852
:param user_slug:
853853
:return:
854854
"""
855-
url = "rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}".format(
856-
projectKey=project_key, repositorySlug=repository_slug, pullRequestId=pull_request_id, userSlug=user_slug,
855+
url = 'rest/api/1.0/projects/{projectKey}/repos/{repo}/pull-requests/{pull_request}/participants/{userSlug}'.format(
856+
projectKey=project_key, repo=repository_slug, pull_request=pull_request_id, userSlug=user_slug,
857857
)
858858
approved = True if status == "APPROVED" else False
859859
data = {

atlassian/confluence.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,11 @@ def get_group_members(self, group_name='confluence-users', start=0, limit=1000,
895895
:param expand: OPTIONAL: A comma separated list of properties to expand on the content. status
896896
:return:
897897
"""
898-
url = 'rest/api/group/{group_name}/member?limit={limit}&start={start}&expand={expand}'.format(group_name=group_name,
899-
limit=limit,
900-
start=start,
901-
expand=expand)
898+
url = 'rest/api/group/{group_name}/member?limit={limit}&start={start}&expand={expand}'.format(
899+
group_name=group_name,
900+
limit=limit,
901+
start=start,
902+
expand=expand)
902903
return (self.get(url) or {}).get('results')
903904

904905
def get_space(self, space_key, expand='description.plain,homepage'):

atlassian/jira.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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):

atlassian/jira8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88

99
class Jira8(Jira):
10-
# methods migrated into main module
10+
# methods migrated into main module

0 commit comments

Comments
 (0)