Skip to content

Commit

Permalink
fixed TYPE_CHECKING import
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed May 8, 2024
1 parent 5aec9db commit 83b3c4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion virtualizarr/tests/test_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,14 @@ def test_combine_by_coords(self, netcdf4_files):
)
@pytest.mark.parametrize("indexes", [None, {}], ids=["None index", "empty dict index"])
def test_anon_read_s3(filetype, indexes):
"""Parameterized tests for empty vs supplied indexes and filetypes."""
# TODO: Switch away from this s3 url after minIO is implemented.
fpath = "s3://carbonplan-share/virtualizarr/local.nc"
assert open_virtual_dataset(fpath, filetype=filetype, indexes=indexes)
vds = open_virtual_dataset(fpath, filetype=filetype, indexes=indexes)

assert vds.dims == {"time": 2920, "lat": 25, "lon": 53}
for var in vds.variables:
assert isinstance(vds[var].data, ManifestArray), var


class TestLoadVirtualDataset:
Expand Down
2 changes: 2 additions & 0 deletions virtualizarr/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Optional, Union

if TYPE_CHECKING:
Expand Down

0 comments on commit 83b3c4b

Please sign in to comment.