Skip to content

Commit 6c794b4

Browse files
committed
fix linter
1 parent c2d2ecc commit 6c794b4

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

src/github_services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import datetime
2222
import logging
2323

24-
from typing import Any, Callable, DefaultDict, Dict, List, Optional, Tuple, Union
24+
from typing import Any, Callable, DefaultDict, Dict, List, Optional, Union
2525
from dateutil import parser
2626
import requests
2727
from src import github_domain

src/main.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,18 @@
5858
TEMPLATE_PATH = '.github/PENDING_REVIEW_NOTIFICATION_TEMPLATE.md'
5959

6060

61-
def generate_message(username: str, pull_requests: List[github_domain.PullRequest], template_path: str=TEMPLATE_PATH) -> str:
61+
def generate_message(
62+
username: str,
63+
pull_requests: List[github_domain.PullRequest],
64+
template_path: str=TEMPLATE_PATH
65+
) -> str:
6266
"""Generates message using the template provided in
6367
PENDING_REVIEW_NOTIFICATION_TEMPLATE.md.
6468
6569
Args:
6670
username: str. Reviewer username.
67-
pr_list: List[github_domain.PullRequest]. List of PullRequest not reviewed within the maximum waiting time.
71+
pr_list: List[github_domain.PullRequest]. List of PullRequest objects not reviewed within
72+
the maximum waiting time.
6873
template_path: str. The template file path.
6974
7075
Returns:
@@ -120,8 +125,9 @@ def main(args: Optional[List[str]]=None) -> None:
120125

121126
github_services.init_service(parsed_args.token)
122127

123-
reviewer_to_assigned_prs: DefaultDict[str, List[github_domain.PullRequest]] = github_services.get_prs_assigned_to_reviewers(
124-
org_name, repo_name, max_wait_hours)
128+
reviewer_to_assigned_prs: DefaultDict[str, List[github_domain.PullRequest]] = (
129+
github_services.get_prs_assigned_to_reviewers(org_name, repo_name, max_wait_hours)
130+
)
125131

126132
github_services.delete_discussions(
127133
org_name, repo_name, discussion_category)

tests/github_services_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def test_get_prs_assigned_to_reviewers(self) -> None:
291291

292292
self.assertEqual(mock_request.call_count, 6)
293293

294+
294295
def test_get_discussion_data(self) -> None:
295296
"""Test _get_discussion_data."""
296297

@@ -464,3 +465,11 @@ def test_add_discussion_comments(self) -> None:
464465
self.assertTrue(mock_response_2.assert_called)
465466
self.assertTrue(mock_response_3.assert_called)
466467
self.assertEqual(mock_post.call_count, 3)
468+
469+
470+
_get_repository_id
471+
_get_category_id
472+
_get_discussion_ids
473+
_delete_discussion
474+
delete_discussions
475+
create_discussion

0 commit comments

Comments
 (0)