Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#350)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.4.3](astral-sh/ruff-pre-commit@v0.3.5...v0.4.3)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed May 7, 2024
1 parent bd11bec commit 4e52900
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -20,7 +20,7 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.3.5'
rev: 'v0.4.3'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
10 changes: 5 additions & 5 deletions src/scmrepo/git/backend/dulwich/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def clone(
cls._set_mirror(repo, progress=progress)
else:
cls._set_default_tracking_branch(repo)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise CloneError(url, os.fsdecode(to_path)) from exc

@staticmethod
Expand Down Expand Up @@ -580,7 +580,7 @@ def iter_remote_refs(self, url: str, base: Optional[str] = None, **kwargs):
try:
_remote, location = get_remote_repo(self.repo, url)
client, path = get_transport_and_path(location, **kwargs)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise InvalidRemote(url) from exc

try:
Expand Down Expand Up @@ -617,7 +617,7 @@ def push_refspecs( # noqa: C901
try:
_remote, location = get_remote_repo(self.repo, url)
client, path = get_transport_and_path(location, **kwargs)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise SCMError(f"'{url}' is not a valid Git remote or URL") from exc

change_result = {}
Expand Down Expand Up @@ -910,7 +910,7 @@ def validate_git_remote(self, url: str, **kwargs):
try:
_, location = get_remote_repo(self.repo, url)
client, path = get_transport_and_path(location, **kwargs)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise InvalidRemote(url) from exc
if isinstance(client, LocalGitClient) and not os.path.exists(
os.path.join("", path)
Expand Down Expand Up @@ -989,5 +989,5 @@ def ls_remote(url: str) -> dict[str, str]:
return {os.fsdecode(ref): sha.decode("ascii") for ref, sha in refs.items()}
except HTTPUnauthorized as exc:
raise AuthError(url) from exc
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise InvalidRemote(url) from exc
2 changes: 1 addition & 1 deletion src/scmrepo/git/lfs/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def open(
raise
try:
self.fetch(fetch_url, [obj], batch_size=batch_size)
except BaseException as exc: # noqa: BLE001
except BaseException as exc:
raise FileNotFoundError(
errno.ENOENT, os.strerror(errno.ENOENT), path
) from exc
Expand Down
2 changes: 1 addition & 1 deletion src/scmrepo/git/stash.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def pop(self, **kwargs):
rev = self.scm.resolve_rev(ref)
try:
self.apply(rev, **kwargs)
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise SCMError("Could not apply stash commit") from exc
self.drop()
return rev
Expand Down

0 comments on commit 4e52900

Please sign in to comment.