Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#399)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: skshetry <18718008+skshetry@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] and skshetry authored Jan 31, 2025
1 parent 3ae999a commit 3e0917c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.8.4'
rev: 'v0.9.3'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.0
hooks:
- id: codespell
additional_dependencies: ["tomli"]
4 changes: 2 additions & 2 deletions src/scmrepo/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def install_hook(self, name: str, script: str, interpreter: str = "sh") -> None:
self.hooks_dir.mkdir(exist_ok=True)
hook = self.hooks_dir / name

directive = f"#!{shutil.which(interpreter) or '/bin/sh' }"
directive = f"#!{shutil.which(interpreter) or '/bin/sh'}"
hook.write_text(f"{directive}\n{script}\n", encoding="utf-8")
hook.chmod(0o777)

Expand Down Expand Up @@ -287,7 +287,7 @@ def close(self):
def no_commits(self):
return not bool(self.get_ref("HEAD"))

# Prefer re-using the most recently used backend when possible. When
# Prefer reusing the most recently used backend when possible. When
# changing backends (due to unimplemented calls), we close the previous
# backend to release any open git files/contexts that may cause conflicts
# with the new backend.
Expand Down
2 changes: 1 addition & 1 deletion src/scmrepo/git/backend/gitpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def clone(
# In fix_env, we delete LD_LIBRARY_PATH key if it was empty before
# PyInstaller modified it. GitPython, in git.Repo.clone_from, uses
# env to update its own internal state. When there is no key in
# env, this value is not updated and GitPython re-uses
# env, this value is not updated and GitPython reuses
# LD_LIBRARY_PATH that has been set by PyInstaller.
# See [1] for more info.
# [1] https://github.com/gitpython-developers/GitPython/issues/924
Expand Down
2 changes: 1 addition & 1 deletion src/scmrepo/git/backend/pygit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def _default_status(
for refname in remote_refs:
if fnmatch.fnmatch(refname, lh):
src = refname
dst = f"{rh_prefix}{refname[len(lh_prefix):]}"
dst = f"{rh_prefix}{refname[len(lh_prefix) :]}"
result[dst] = cb.result.get(
src, _default_status(src, dst, remote_refs)
)
Expand Down
2 changes: 1 addition & 1 deletion src/scmrepo/git/lfs/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _collect_objects(
and (result := _ROOT_PATH_PREFIX_REGEX.match(path := include[0]))
):
root = result.group("prefix")
if path in {root, f'{root.rstrip("/")}/**'}:
if path in {root, f"{root.rstrip('/')}/**"}:
include = []
else:
root = "/"
Expand Down

0 comments on commit 3e0917c

Please sign in to comment.