Skip to content

Commit

Permalink
updating group type annotation for netcdf, hdf5, and zarr open_datatr…
Browse files Browse the repository at this point in the history
…ee function (#9614)

* updating group type annotation for netcdf, hdf5, and zarr open_datatree function

* supporting only  in group type annotation for netcdf, hdf5, and zarr open_datatree function

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
aladinor and pre-commit-ci[bot] authored Oct 13, 2024
1 parent 707231e commit e407d65
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions xarray/backends/h5netcdf_.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import functools
import io
import os
from collections.abc import Callable, Iterable
from collections.abc import Iterable
from typing import TYPE_CHECKING, Any

import numpy as np
Expand Down Expand Up @@ -465,7 +465,7 @@ def open_datatree(
use_cftime=None,
decode_timedelta=None,
format=None,
group: str | Iterable[str] | Callable | None = None,
group: str | None = None,
lock=None,
invalid_netcdf=None,
phony_dims=None,
Expand Down Expand Up @@ -511,7 +511,7 @@ def open_groups_as_dict(
use_cftime=None,
decode_timedelta=None,
format=None,
group: str | Iterable[str] | Callable | None = None,
group: str | None = None,
lock=None,
invalid_netcdf=None,
phony_dims=None,
Expand Down
6 changes: 3 additions & 3 deletions xarray/backends/netCDF4_.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import functools
import operator
import os
from collections.abc import Callable, Iterable
from collections.abc import Iterable
from contextlib import suppress
from typing import TYPE_CHECKING, Any

Expand Down Expand Up @@ -700,7 +700,7 @@ def open_datatree(
drop_variables: str | Iterable[str] | None = None,
use_cftime=None,
decode_timedelta=None,
group: str | Iterable[str] | Callable | None = None,
group: str | None = None,
format="NETCDF4",
clobber=True,
diskless=False,
Expand Down Expand Up @@ -745,7 +745,7 @@ def open_groups_as_dict(
drop_variables: str | Iterable[str] | None = None,
use_cftime=None,
decode_timedelta=None,
group: str | Iterable[str] | Callable | None = None,
group: str | None = None,
format="NETCDF4",
clobber=True,
diskless=False,
Expand Down
6 changes: 3 additions & 3 deletions xarray/backends/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
import os
import warnings
from collections.abc import Callable, Iterable
from collections.abc import Iterable
from typing import TYPE_CHECKING, Any

import numpy as np
Expand Down Expand Up @@ -1282,7 +1282,7 @@ def open_datatree(
drop_variables: str | Iterable[str] | None = None,
use_cftime=None,
decode_timedelta=None,
group: str | Iterable[str] | Callable | None = None,
group: str | None = None,
mode="r",
synchronizer=None,
consolidated=None,
Expand Down Expand Up @@ -1328,7 +1328,7 @@ def open_groups_as_dict(
drop_variables: str | Iterable[str] | None = None,
use_cftime=None,
decode_timedelta=None,
group: str | Iterable[str] | Callable | None = None,
group: str | None = None,
mode="r",
synchronizer=None,
consolidated=None,
Expand Down

0 comments on commit e407d65

Please sign in to comment.