Skip to content

Commit

Permalink
remove wrong types from ops
Browse files Browse the repository at this point in the history
  • Loading branch information
headtr1ck committed Sep 20, 2023
1 parent 6e62ae4 commit ed8d936
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions xarray/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from xarray.core.coordinates import Coordinates
from xarray.core.dataarray import DataArray
from xarray.core.dataset import Dataset
from xarray.core.groupby import DataArrayGroupBy, GroupBy
from xarray.core.indexes import Index, Indexes
from xarray.core.utils import Frozen
from xarray.core.variable import Variable
Expand Down Expand Up @@ -163,8 +162,8 @@ def copy(

ScalarOrArray = Union["ArrayLike", np.generic, np.ndarray, "DaskArray"]
VarCompatible = Union["Variable", "ScalarOrArray"]
DaCompatible = Union["DataArray", "DataArrayGroupBy", "VarCompatible"]
DsCompatible = Union["Dataset", "GroupBy", "DaCompatible"]
DaCompatible = Union["DataArray", "VarCompatible"]
DsCompatible = Union["Dataset", "DaCompatible"]
GroupByCompatible = Union["Dataset", "DataArray"]

Dims = Union[str, Iterable[Hashable], "ellipsis", None]
Expand Down
2 changes: 1 addition & 1 deletion xarray/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def test_groupby_math_more() -> None:
with pytest.raises(TypeError, match=r"only support binary ops"):
grouped + grouped # type: ignore[operator]
with pytest.raises(TypeError, match=r"in-place operations"):
ds += grouped
ds += grouped # type: ignore[arg-type]

ds = Dataset(
{
Expand Down

0 comments on commit ed8d936

Please sign in to comment.