Skip to content

Commit 46ce739

Browse files
authored
Merge branch 'main' into pyugrade
2 parents a4168c3 + 65decf1 commit 46ce739

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

docs/release.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ Maintenance
5959
* Update ReadTheDocs.
6060
By :user:`John Kirkham <jakirkham>`, :issue:`383`.
6161

62+
* Bring coverage back up to 100%.
63+
By :user:`John Kirkham <jakirkham>` and :user:`Martin Durant <martindurant>`,
64+
:issue:`392` and :issue:`393`.
65+
6266
* Collect coverage on all OSes & enable Codecov.
6367
By :user:`John Kirkham <jakirkham>`, :issue:`386`, :issue:`388`,
6468
:issue:`390`, :issue:`391`.

numcodecs/ndarray_like.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ class NDArrayLike(Protocol, metaclass=_CachedProtocolMeta):
5353
flags: FlagsObj
5454

5555
def __len__(self) -> int:
56-
...
56+
... # pragma: no cover
5757

5858
def __getitem__(self, key) -> Any:
59-
...
59+
... # pragma: no cover
6060

6161
def __setitem__(self, key, value):
62-
...
62+
... # pragma: no cover
6363

6464
def tobytes(self, order: Optional[str] = ...) -> bytes:
65-
...
65+
... # pragma: no cover
6666

6767
def reshape(self, *shape: int, order: str = ...) -> "NDArrayLike":
68-
...
68+
... # pragma: no cover
6969

7070
def view(self, dtype: DType = ...) -> "NDArrayLike":
71-
...
71+
... # pragma: no cover
7272

7373

7474
def is_ndarray_like(obj: object) -> bool:

numcodecs/tests/test_bitround.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ def test_errors():
7878
BitRound(keepbits=99).encode(np.array([0], dtype="float32"))
7979
with pytest.raises(TypeError):
8080
BitRound(keepbits=10).encode(np.array([0]))
81+
with pytest.raises(ValueError):
82+
BitRound(-1)

numcodecs/tests/test_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ def test_all_classes_registered():
3737
# remove `None``
3838
missing.remove(None)
3939
if missing:
40-
raise Exception(f"these codecs are missing: {missing}")
40+
raise Exception(f"these codecs are missing: {missing}") # pragma: no cover

numcodecs/zfpy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def __init__(
4646
self.compression_kwargs = {"rate": rate}
4747
elif mode == _zfpy.mode_fixed_precision:
4848
self.compression_kwargs = {"precision": precision}
49-
else:
50-
pass
5149

5250
self.tolerance = tolerance
5351
self.rate = rate

0 commit comments

Comments
 (0)