Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 4, 2023
1 parent e5c6a10 commit e12dad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo_helper_bot/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit e12dad4

Please sign in to comment.