Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type check datatree tests #9632

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
type hints for datatree indexing tests
  • Loading branch information
TomNicholas committed Oct 16, 2024
commit 8f28e579994cde0acd2bd39a638a76623b7c1a55
6 changes: 3 additions & 3 deletions xarray/tests/test_datatree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ def test_filter(self):

class TestIndexing:

def test_isel_siblings(self):
def test_isel_siblings(self) -> None:
tree = DataTree.from_dict(
{
"/first": xr.Dataset({"a": ("x", [1, 2])}),
Expand Down Expand Up @@ -1616,7 +1616,7 @@ def test_isel_siblings(self):
actual = tree.isel(x=slice(None))
assert_equal(actual, tree)

def test_isel_inherited(self):
def test_isel_inherited(self) -> None:
tree = DataTree.from_dict(
{
"/": xr.Dataset(coords={"x": [1, 2]}),
Expand Down Expand Up @@ -1664,7 +1664,7 @@ def test_isel_inherited(self):
)
assert_identical(actual, expected)

def test_sel(self):
def test_sel(self) -> None:
tree = DataTree.from_dict(
{
"/first": xr.Dataset({"a": ("x", [1, 2, 3])}, coords={"x": [1, 2, 3]}),
Expand Down