Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
- 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
Expand Down Expand Up @@ -43,7 +43,7 @@ repos:
- id: bind-requirements

- repo: https://github.com/python-formate/flake8-dunder-all
rev: v0.4.1
rev: v0.5.0
hooks:
- id: ensure-dunder-all
files: ^repo_helper_bot/.*\.py$
Expand All @@ -62,15 +62,15 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/asottile/pyupgrade
rev: v2.12.0
rev: v3.20.0
hooks:
- id: pyupgrade
args:
- --py36-plus
- --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
Expand Down
4 changes: 2 additions & 2 deletions repo_helper_bot/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading