From ad1ad675d933c43e16479b512cb00beed1ade375 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sat, 16 Nov 2024 10:53:33 +0000 Subject: [PATCH] Ignore some lines for coverage (#633) * Ignore some lines for coverage * Move code coverage skips to branches Co-authored-by: jakirkham * Remove additional import Co-authored-by: jakirkham --------- Co-authored-by: jakirkham --- numcodecs/checksum32.py | 2 +- numcodecs/tests/test_zarr3.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/numcodecs/checksum32.py b/numcodecs/checksum32.py index d5f6a8da..180907cc 100644 --- a/numcodecs/checksum32.py +++ b/numcodecs/checksum32.py @@ -9,7 +9,7 @@ from .compat import ensure_contiguous_ndarray, ndarray_copy from .jenkins import jenkins_lookup3 -if TYPE_CHECKING: +if TYPE_CHECKING: # pragma: no cover from typing_extensions import Buffer CHECKSUM_LOCATION = Literal['start', 'end'] diff --git a/numcodecs/tests/test_zarr3.py b/numcodecs/tests/test_zarr3.py index cdc9b206..dc920ecb 100644 --- a/numcodecs/tests/test_zarr3.py +++ b/numcodecs/tests/test_zarr3.py @@ -5,10 +5,10 @@ import numpy as np import pytest -if not TYPE_CHECKING: - zarr = pytest.importorskip("zarr") -else: +if TYPE_CHECKING: # pragma: no cover import zarr +else: + zarr = pytest.importorskip("zarr") import zarr.storage from zarr.core.common import JSON