|
1 | 1 | # coding=utf-8 |
2 | 2 | import logging |
3 | 3 | from enum import Enum |
| 4 | +from typing import Optional |
4 | 5 |
|
5 | 6 | from deprecated import deprecated |
6 | 7 | from requests import HTTPError |
7 | 8 |
|
8 | | -from .base import BitbucketBase |
9 | 9 | from atlassian.bitbucket.cloud import Cloud |
10 | 10 |
|
| 11 | +from .base import BitbucketBase |
| 12 | + |
11 | 13 | log = logging.getLogger(__name__) |
12 | 14 |
|
13 | 15 |
|
@@ -1891,7 +1893,7 @@ def get_pull_requests_participants( |
1891 | 1893 |
|
1892 | 1894 | def assign_pull_request_participant_role( |
1893 | 1895 | self, project_key: str, repository_slug: str, pull_request_id: int, role: str, user: str |
1894 | | - ) -> dict: |
| 1896 | + ) -> Optional[dict]: |
1895 | 1897 | """ |
1896 | 1898 | Assign a role to a user for a pull request |
1897 | 1899 | :param project_key: The project key |
@@ -2117,7 +2119,9 @@ def add_pull_request_blocker_comment( |
2117 | 2119 | data = {"text": text, "severity": severity} |
2118 | 2120 | return self.post(url, data=data) |
2119 | 2121 |
|
2120 | | - def search_pull_request_blocker_comment(self, project_key: str, repository_slug: str, pull_request_id: int) -> dict: |
| 2122 | + def search_pull_request_blocker_comment( |
| 2123 | + self, project_key: str, repository_slug: str, pull_request_id: int |
| 2124 | + ) -> Optional[dict]: |
2121 | 2125 | """ |
2122 | 2126 | Get all comments that block the merge of a pull request |
2123 | 2127 | :param project_key: The project key |
|
0 commit comments