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 Jan 6, 2025
1 parent 903fdc0 commit 01c9a5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions southwark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,13 @@ def clone(
target_config = r.get_config()

target_config.set(("remote", origin), "url", source.encode("UTF-8"))
target_config.set(("remote", origin), "fetch", f"+refs/heads/*:refs/remotes/{origin}/*".encode("UTF-8"))
target_config.set(("remote", origin), "fetch", f"+refs/heads/*:refs/remotes/{origin}/*".encode())
target_config.write_to_path()
fetch_result = fetch(
r,
origin,
errstream=errstream,
message=f"clone: from {source}".encode("UTF-8"),
message=f"clone: from {source}".encode(),
depth=depth,
**kwargs,
)
Expand Down
4 changes: 2 additions & 2 deletions southwark/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def set_remote_ssh(config: ConfigFile, domain: str, username: str, repo: str, na
:param name: The name of the remote to set.
"""

config.set(("remote", name), "url", f"git@{domain}:{username}/{repo}.git".encode("UTF-8"))
config.set(("remote", name), "url", f"git@{domain}:{username}/{repo}.git".encode())


def set_remote_http(config: ConfigFile, domain: str, username: str, repo: str, name: str = "origin") -> None:
Expand All @@ -76,7 +76,7 @@ def set_remote_http(config: ConfigFile, domain: str, username: str, repo: str, n
:param name: The name of the remote to set.
"""

config.set(("remote", name), "url", f"https://{domain}/{username}/{repo}.git".encode("UTF-8"))
config.set(("remote", name), "url", f"https://{domain}/{username}/{repo}.git".encode())


set_remote_html = set_remote_http
Expand Down
3 changes: 1 addition & 2 deletions southwark/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def __init__(self, repo: Union[dulwich.repo.Repo, PathLike] = '.'):
#: Mapping of git refs to commit SHAs.
self.refs: Dict[str, str] = {
k.decode("UTF-8"): v.decode("UTF-8")
for k,
v in self.repo.get_refs().items()
for k, v in self.repo.get_refs().items()
if not k.startswith(b"refs/tags/")
}

Expand Down

0 comments on commit 01c9a5f

Please sign in to comment.