From 4f7e7f55ee20fa250c2e424b0b5cfa799e5310c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 21:21:31 +0000 Subject: [PATCH 1/2] ci(pre-commit.ci): autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/adhtruong/mirrors-typos: v1.39.0 → v1.40.0](https://github.com/adhtruong/mirrors-typos/compare/v1.39.0...v1.40.0) - [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.3...v0.14.7) - [github.com/pre-commit/mirrors-mypy: v1.18.2 → v1.19.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.18.2...v1.19.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 adc0f75..198a581 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,19 +10,19 @@ repos: - id: validate-pyproject - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.39.0 + rev: v1.40.0 hooks: - id: typos args: [--force-exclude] # omit --write-changes - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.3 + rev: v0.14.7 hooks: - id: ruff-check - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.2 + rev: v1.19.0 hooks: - id: mypy files: "^src/" From f8b848eb6197788b9efee5259c982d57c0ca6c51 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Tue, 2 Dec 2025 16:19:56 -0500 Subject: [PATCH 2/2] fix --- src/nd2/_parse/_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nd2/_parse/_parse.py b/src/nd2/_parse/_parse.py index 49dc1ba..3f42cc8 100644 --- a/src/nd2/_parse/_parse.py +++ b/src/nd2/_parse/_parse.py @@ -505,7 +505,7 @@ def load_global_metadata( match = re.search(r"\s?(\d+)?x", text_info["optics"], re.IGNORECASE) if match: mag = float(match[1]) - projectiveMagnification = raw_meta.get("dProjectiveMag") + projectiveMagnification: float | None = raw_meta.get("dProjectiveMag") if projectiveMagnification and projectiveMagnification < 0: projectiveMagnification = None pinhole = raw_meta.get("dPinholeRadius", 0) * 2