Skip to content

Commit

Permalink
Polish for linters
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Mar 14, 2023
1 parent a97d29c commit cce5c3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
27 changes: 10 additions & 17 deletions atlassian/bitbucket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2190,41 +2190,34 @@ def get_commits(
if limit:
params["limit"] = limit
return self._get_paged(url, params=params)

def get_commit_changes(
self,
project_key,
repository_slug,
hash_newest=None,
merges="include",
commitId=None
):

def get_commit_changes(self, project_key, repository_slug, hash_newest=None, merges="include", commit_id=None):
"""
Get commit list from repo
:param project_key:
:param repository_slug:
:param hash_newest:
:param merges: OPTIONAL: include|exclude|only if present, controls how merge commits should be filtered.
:param commitId
:param commit_id
:return:
"""
url = self._url_commit_c(project_key, repository_slug, commitId=commitId)
url = self._url_commit_c(project_key, repository_slug, commit_id=commit_id)
params = {"merges": merges}
if hash_newest:
params["until"] = hash_newest
return self.get(url, params=params)
def _url_commit_c(self, project_key, repository_slug, api_root=None, api_version=None, commitId=None):

def _url_commit_c(self, project_key, repository_slug, api_root=None, api_version=None, commit_id=None):
return "{}/commits/{}/changes".format(
self._url_repo(
project_key,
repository_slug,
api_root=api_root,
api_version=api_version,
),
commitId
commit_id,
)

def _url_commit(
self,
project_key,
Expand Down Expand Up @@ -2347,7 +2340,7 @@ def get_code_insights_report(self, project_key, repository_slug, commit_id, repo
Retrieve the specified code-insights report.
:projectKey: str
:repositorySlug: str
:commitId: str
:commit_id: str
:report_key: str
"""
url = self._url_code_insights_report(project_key, repository_slug, commit_id, report_key)
Expand All @@ -2358,7 +2351,7 @@ def delete_code_insights_report(self, project_key, repository_slug, commit_id, r
Delete a report for the given commit. Also deletes any annotations associated with this report.
:projectKey: str
:repositorySlug: str
:commitId: str
:commit_id: str
:report_key: str
"""
url = self._url_code_insights_report(project_key, repository_slug, commit_id, report_key)
Expand Down
1 change: 1 addition & 0 deletions atlassian/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def put(
Partial modification of resource by PATCH Method
LINK: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH
"""

def patch(
self,
path,
Expand Down

0 comments on commit cce5c3f

Please sign in to comment.