Skip to content

Commit 6a42478

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8573b4a commit 6a42478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

repo_helper_bot/updater.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def update_repository(repository: Dict, recreate: bool = False) -> int:
111111
if recreate:
112112
# Delete any existing branch and create again from master
113113
recreate_branch(repo)
114-
elif f"refs/remotes/origin/{BRANCH_NAME}".encode("UTF-8") in dict(repo.refs):
114+
elif f"refs/remotes/origin/{BRANCH_NAME}".encode() in dict(repo.refs):
115115
checkout_branch(repo)
116116
else:
117117
# Switch to new branch
@@ -266,7 +266,7 @@ def create_branch(repo: Union[dulwich.repo.Repo, PathLike]) -> None:
266266

267267
with open_repo_closing(repo) as repo: # pylint: disable=redefined-argument-from-local
268268
dulwich.porcelain.update_head(repo, b"HEAD", new_branch=BRANCH_NAME.encode("UTF-8"))
269-
repo.refs[f"refs/heads/{BRANCH_NAME}".encode("UTF-8")] = repo.refs[b'refs/heads/master']
269+
repo.refs[f"refs/heads/{BRANCH_NAME}".encode()] = repo.refs[b'refs/heads/master']
270270

271271

272272
def clone(url: str, dest: PathLike) -> Repo:

0 commit comments

Comments
 (0)