From 7e0c18594c1e2d5e777ae112910cb19c3e9ec954 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 2 Jul 2022 17:58:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/oca_github_bot/tasks/migration_issue_bot.py | 4 +++- tests/test_migration_issue_bot.py | 15 ++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/oca_github_bot/tasks/migration_issue_bot.py b/src/oca_github_bot/tasks/migration_issue_bot.py index 86118b5a..0837fc33 100644 --- a/src/oca_github_bot/tasks/migration_issue_bot.py +++ b/src/oca_github_bot/tasks/migration_issue_bot.py @@ -113,7 +113,9 @@ def migration_issue_start(org, repo, pr, username, module=None, dry_run=False): ) return # Change issue to add the PR in the module list - new_body = _set_lines_issue(gh_pr.user.login, gh_pr.number, issue.body, module) + new_body = _set_lines_issue( + gh_pr.user.login, gh_pr.number, issue.body, module + ) issue.edit(body=new_body) except Exception as e: github.gh_call( diff --git a/tests/test_migration_issue_bot.py b/tests/test_migration_issue_bot.py index 60d2e2ac..d530d5c2 100644 --- a/tests/test_migration_issue_bot.py +++ b/tests/test_migration_issue_bot.py @@ -37,29 +37,26 @@ def test_set_lines_issue(gh): body_transformation = [ ( - "Issue with no list" - , + "Issue with no list", f"Issue with no list\n" - f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}" + f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}", ), ( "Issue with list but not the module\n" "- [ ] a_module_1 - By @legalsylvain - #1\n" - "- [ ] z_module_1 - By @pedrobaeza - #2" - , + "- [ ] z_module_1 - By @pedrobaeza - #2", f"Issue with list but not the module\n" f"- [ ] a_module_1 - By @legalsylvain - #1\n" f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}\n" - f"- [ ] z_module_1 - By @pedrobaeza - #2" + f"- [ ] z_module_1 - By @pedrobaeza - #2", ), ( f"Issue with list containing the module\n" f"- [x] {module} - By @legalsylvain - #1\n" - f"- [ ] z_module_1 - By @pedrobaeza - #2" - , + f"- [ ] z_module_1 - By @pedrobaeza - #2", f"Issue with list containing the module\n" f"- [x] {module} - By @{gh_pr_user_login} - #{gh_pr_number}\n" - f"- [ ] z_module_1 - By @pedrobaeza - #2" + f"- [ ] z_module_1 - By @pedrobaeza - #2", ), ] for (old_body, new_body_expected) in body_transformation: