From 051951aed9fa1c3b1a9dab9e44525b1b6355993c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:58:40 -0500 Subject: [PATCH] ci(pre-commit.ci): autoupdate (#189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci(pre-commit.ci): autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.292...v0.1.4) - [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1) - [github.com/abravalheri/validate-pyproject: v0.14 → v0.15](https://github.com/abravalheri/validate-pyproject/compare/v0.14...v0.15) - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.6.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.6.1) * fix precommit * don't test aicsimageio on 3.7 * whoops 38 * style(pre-commit.ci): auto fixes [...] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert --- .pre-commit-config.yaml | 10 +++++----- src/nd2/readers/_legacy/legacy_reader.py | 2 +- tests/test_aicsimage.py | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29c31af..3422668 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,30 +13,30 @@ repos: # stages: [commit-msg] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-docstring-first - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.292 + rev: v0.1.4 hooks: - id: ruff args: [--fix] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.14 + rev: v0.15 hooks: - id: validate-pyproject - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.6.1 hooks: - id: mypy files: "^src/" diff --git a/src/nd2/readers/_legacy/legacy_reader.py b/src/nd2/readers/_legacy/legacy_reader.py index 848572d..81e718f 100644 --- a/src/nd2/readers/_legacy/legacy_reader.py +++ b/src/nd2/readers/_legacy/legacy_reader.py @@ -327,7 +327,7 @@ def text_info(self) -> strct.TextInfo: @cached_property def _advanced_image_attributes(self) -> dict: - return self._decode_chunk(b"ARTT").get("AdvancedImageAttributes", {}) + return self._decode_chunk(b"ARTT").get("AdvancedImageAttributes") or {} @cached_property def _raw_exp_loops(self) -> RawExperimentLoop: diff --git a/tests/test_aicsimage.py b/tests/test_aicsimage.py index 2dce959..d6d3a84 100644 --- a/tests/test_aicsimage.py +++ b/tests/test_aicsimage.py @@ -3,6 +3,7 @@ It may need updating if it changes upstream """ +import sys from pathlib import Path from typing import List, Optional, Tuple @@ -16,6 +17,7 @@ DATA = Path(__file__).parent / "data" +@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires python3.8 or higher") @pytest.mark.parametrize( ( "filename",