From e12dad49d6d429dda1c21ad7efdf40ccd87fd506 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 02:06:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- repo_helper_bot/updater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repo_helper_bot/updater.py b/repo_helper_bot/updater.py index 0b19bae..dd010b9 100644 --- a/repo_helper_bot/updater.py +++ b/repo_helper_bot/updater.py @@ -110,7 +110,7 @@ def update_repository(repository: Dict, recreate: bool = False) -> int: if recreate: # Delete any existing branch and create again from master recreate_branch(repo) - elif f"refs/remotes/origin/{BRANCH_NAME}".encode("UTF-8") in dict(repo.refs): + elif f"refs/remotes/origin/{BRANCH_NAME}".encode() in dict(repo.refs): checkout_branch(repo) else: # Switch to new branch @@ -265,7 +265,7 @@ def create_branch(repo: Union[dulwich.repo.Repo, PathLike]): with open_repo_closing(repo) as repo: # pylint: disable=redefined-argument-from-local dulwich.porcelain.update_head(repo, b"HEAD", new_branch=BRANCH_NAME.encode("UTF-8")) - repo.refs[f"refs/heads/{BRANCH_NAME}".encode("UTF-8")] = repo.refs[b'refs/heads/master'] + repo.refs[f"refs/heads/{BRANCH_NAME}".encode()] = repo.refs[b'refs/heads/master'] def clone(url: str, dest: PathLike) -> Repo: