From fcb654a67844c092038a0f679c6103fd5f5cbd2d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:08:38 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.9.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.9.3) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.0](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2aa22b6..1e49afd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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"] From 8c2f37d914dcf95830e732ab6e784cb965b3b972 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:09:26 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/scmrepo/git/__init__.py | 2 +- src/scmrepo/git/backend/pygit2/__init__.py | 2 +- src/scmrepo/git/lfs/fetch.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scmrepo/git/__init__.py b/src/scmrepo/git/__init__.py index 6d54b34..955b670 100644 --- a/src/scmrepo/git/__init__.py +++ b/src/scmrepo/git/__init__.py @@ -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) diff --git a/src/scmrepo/git/backend/pygit2/__init__.py b/src/scmrepo/git/backend/pygit2/__init__.py index 61cb936..e4a11b2 100644 --- a/src/scmrepo/git/backend/pygit2/__init__.py +++ b/src/scmrepo/git/backend/pygit2/__init__.py @@ -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) ) diff --git a/src/scmrepo/git/lfs/fetch.py b/src/scmrepo/git/lfs/fetch.py index cb3aef7..a69b58c 100644 --- a/src/scmrepo/git/lfs/fetch.py +++ b/src/scmrepo/git/lfs/fetch.py @@ -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 = "/" From db5d90072baff2d1d93e5cb5708ff9808d989ff5 Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:52:23 +0545 Subject: [PATCH 3/3] fix codespell --- src/scmrepo/git/__init__.py | 2 +- src/scmrepo/git/backend/gitpython.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scmrepo/git/__init__.py b/src/scmrepo/git/__init__.py index 955b670..d607453 100644 --- a/src/scmrepo/git/__init__.py +++ b/src/scmrepo/git/__init__.py @@ -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. diff --git a/src/scmrepo/git/backend/gitpython.py b/src/scmrepo/git/backend/gitpython.py index f059b4d..8b15fe6 100644 --- a/src/scmrepo/git/backend/gitpython.py +++ b/src/scmrepo/git/backend/gitpython.py @@ -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