From 19a14095189c9c435b96f963eeddd257410b003b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 20:59: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.14.10 → v0.14.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.10...v0.14.14) - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.1.0) - [github.com/kynan/nbstripout: 0.8.2 → 0.9.0](https://github.com/kynan/nbstripout/compare/0.8.2...0.9.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dc2f1ef..880f4e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,13 +33,13 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.14.10 + rev: v0.14.14 hooks: - id: ruff args: [ --fix, --exit-non-zero-on-fix ] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black types: [python] @@ -48,7 +48,7 @@ repos: - id: black-jupyter - repo: https://github.com/kynan/nbstripout - rev: 0.8.2 + rev: 0.9.0 hooks: - id: nbstripout From 00b6d2d90c905c2e1f55195be41e16ecac46e717 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 21:00:00 +0000 Subject: [PATCH 2/2] [pre-commit.ci] Fixing issues with pre-commit --- AFMReader/gwy.py | 6 ++---- AFMReader/jpk.py | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/AFMReader/gwy.py b/AFMReader/gwy.py index 087af4b..834cd25 100644 --- a/AFMReader/gwy.py +++ b/AFMReader/gwy.py @@ -75,11 +75,9 @@ def load_gwy(file_path: Path | str, channel: str) -> tuple[np.ndarray[Any, np.fl image = image * 1e9 px_to_nm = px_to_nm * 1e9 else: - raise ValueError( - f"Units '{units}' have not been added for .gwy files. Please add \ + raise ValueError(f"Units '{units}' have not been added for .gwy files. Please add \ an SI to nanometre conversion factor for these units in _gwy_read_component in \ - io.py." - ) + io.py.") except FileNotFoundError: logger.info(f"[{filename}] File not found : {file_path}") diff --git a/AFMReader/jpk.py b/AFMReader/jpk.py index 7da1605..4a13a61 100644 --- a/AFMReader/jpk.py +++ b/AFMReader/jpk.py @@ -269,7 +269,7 @@ def _load_jpk_tags(config_path: str | Path | None = None) -> dict[str, int]: Dictionary of JPK configuration options. """ if config_path is None: - config_path = resources.files(__package__) / "default_config.yaml" # type:ignore[assignment] - config = read_yaml(Path(config_path)) # type:ignore[arg-type] + config_path = resources.files(__package__) / "default_config.yaml" # type: ignore[assignment] + config = read_yaml(Path(config_path)) # type: ignore[arg-type] logger.info(f"Configuration loaded from : {config_path}") return config["jpk"]