|
2 | 2 |
|
3 | 3 | import io |
4 | 4 | import os |
| 5 | +from typing import Any |
5 | 6 |
|
6 | 7 | import numpy as np |
7 | 8 | import pytest |
|
10 | 11 | from numpy.testing import assert_array_equal |
11 | 12 |
|
12 | 13 | import asdf |
| 14 | +import asdf.versioning |
13 | 15 | from asdf import constants, generic_io |
14 | 16 | from asdf._block import io as bio |
15 | 17 | from asdf.exceptions import AsdfBlockIndexWarning |
@@ -57,6 +59,8 @@ def test_invalid_array_storage(): |
57 | 59 | tree = {"my_array": my_array} |
58 | 60 | ff = asdf.AsdfFile(tree) |
59 | 61 | with pytest.raises(ValueError, match=r"array_storage must be one of.*"): |
| 62 | + # Intentionally incorrect storage type |
| 63 | + # pyrefly: ignore[bad-argument-type] |
60 | 64 | ff.set_array_storage(my_array, "foo") |
61 | 65 |
|
62 | 66 |
|
@@ -883,7 +887,9 @@ def test_add_block_before_fully_loaded(tmp_path): |
883 | 887 | @pytest.mark.parametrize("all_array_storage", ["internal", "external", "inline"]) |
884 | 888 | @pytest.mark.parametrize("all_array_compression", [None, "", "zlib", "bzp2", "lz4", "input"]) |
885 | 889 | @pytest.mark.parametrize("compression_kwargs", [None, {}]) |
886 | | -def test_write_to_update_storage_options(tmp_path, all_array_storage, all_array_compression, compression_kwargs): |
| 890 | +def test_write_to_update_storage_options( |
| 891 | + tmp_path, all_array_storage, all_array_compression, compression_kwargs: dict[str, Any] |
| 892 | +): |
887 | 893 | if all_array_compression == "bzp2" and compression_kwargs is not None: |
888 | 894 | compression_kwargs = {"compresslevel": 1} |
889 | 895 |
|
|
0 commit comments