diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 680886e..71925b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,12 +8,12 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.11.0 + rev: v0.11.1 hooks: - id: reformat-pyproject - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -62,7 +62,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/asottile/pyupgrade - rev: v2.12.0 + rev: v3.17.0 hooks: - id: pyupgrade args: @@ -70,7 +70,7 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.1 + rev: v1.5.5 hooks: - id: remove-crlf - id: forbid-crlf diff --git a/repo_helper_bot/updater.py b/repo_helper_bot/updater.py index 2a2553b..896883b 100644 --- a/repo_helper_bot/updater.py +++ b/repo_helper_bot/updater.py @@ -111,7 +111,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 @@ -266,7 +266,7 @@ def create_branch(repo: Union[dulwich.repo.Repo, PathLike]) -> None: 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: