From c66d0fcbdbde810f2acdd2df4994c57d34c26f7d 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:55:36 +0000 Subject: [PATCH 1/2] [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.3 → v0.9.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.3...v0.9.3) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1) --- .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 79c6474..d3c6d39 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,14 +9,14 @@ repos: - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.8.3' + rev: 'v0.9.3' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.1 hooks: - id: mypy additional_dependencies: From 79c7836e1854c5e90f838f7f126e2d82e2d8e40d 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:55:46 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/unearth/utils.py | 6 +++--- src/unearth/vcs/bazaar.py | 2 +- tests/test_evaluator.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/unearth/utils.py b/src/unearth/utils.py index 67449c4..2a4d577 100644 --- a/src/unearth/utils.py +++ b/src/unearth/utils.py @@ -64,9 +64,9 @@ def url_to_path(url: str) -> str: """ Convert a file: URL to a path. """ - assert url.startswith( - "file:" - ), f"You can only turn file: urls into filenames (not {url!r})" + assert url.startswith("file:"), ( + f"You can only turn file: urls into filenames (not {url!r})" + ) _, netloc, path, _, _ = parse.urlsplit(url) diff --git a/src/unearth/vcs/bazaar.py b/src/unearth/vcs/bazaar.py index a1d464b..934b4b9 100644 --- a/src/unearth/vcs/bazaar.py +++ b/src/unearth/vcs/bazaar.py @@ -33,7 +33,7 @@ def fetch_new( elif self.verbosity == 1: flag = "" else: - flag = f"-{'v'*self.verbosity}" + flag = f"-{'v' * self.verbosity}" cmd_args: list[str | HiddenText] = [ "branch", flag, diff --git a/tests/test_evaluator.py b/tests/test_evaluator.py index 0231687..0412eb7 100644 --- a/tests/test_evaluator.py +++ b/tests/test_evaluator.py @@ -155,8 +155,7 @@ def test_evaluate_against_missing_version(link): True, ), ( - "https://test.pypi.org/files/click-8.1.3-py3-none-any.whl" - "#sha256=1112222", + "https://test.pypi.org/files/click-8.1.3-py3-none-any.whl#sha256=1112222", False, ), ],