Skip to content

Commit 3e2681c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d21f7a6 commit 3e2681c

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/oca_github_bot/tasks/tag_ready_to_merge.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def tag_ready_to_merge(org, repo=None, dry_run=False):
4242
for issue in gh.search_issues(" ".join(query)):
4343
if dry_run:
4444
_logger.info(
45-
f"DRY-RUN add {LABEL_READY_TO_MERGE} "
46-
f"label to PR {issue.html_url}"
45+
f"DRY-RUN add {LABEL_READY_TO_MERGE} label to PR {issue.html_url}"
4746
)
4847
else:
4948
_logger.info(f"add {LABEL_READY_TO_MERGE} label to PR {issue.html_url}")

src/oca_github_bot/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def compute_module_label_name(module_name: str) -> str:
5757
if len(label_name) > _MAX_LABEL_SIZE:
5858
module_hash = hashlib.sha256(bytes(module_name, "utf-8")).hexdigest()
5959
label_name = (
60-
f"{label_name[:(_MAX_LABEL_SIZE - (_HASH_SIZE + 1))]}"
60+
f"{label_name[: (_MAX_LABEL_SIZE - (_HASH_SIZE + 1))]}"
6161
f" {module_hash[:_HASH_SIZE]}"
6262
)
6363
return label_name

tests/test_manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def test_git_modified_addons_merge_base(git_clone):
176176
subprocess.check_call(["git", "commit", "-m", "[BOT] add addon2"], cwd=git_clone)
177177
assert git_modified_addons(git_clone, "origin/master") == ({"addon2"}, False)
178178
# create addon1 on a new branch
179-
subprocess.check_call(["git", "checkout", "-b" "addon1"], cwd=git_clone)
179+
subprocess.check_call(["git", "checkout", "-baddon1"], cwd=git_clone)
180180
addon1_dir = git_clone / "addon1"
181181
addon1_dir.mkdir()
182182
(addon1_dir / "__manifest__.py").write_text("{'name': 'addon1'}")

0 commit comments

Comments
 (0)