From 7bd29a28c59bd9564efc544a9d09c9a1a71b54df Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Thu, 24 Nov 2022 07:33:52 +0100 Subject: [PATCH 1/8] Allow type checking dask --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 271abc0aab1..c07f3096f9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,8 +40,6 @@ module = [ "cfgrib.*", "cftime.*", "cupy.*", - "dask.*", - "distributed.*", "fsspec.*", "h5netcdf.*", "h5py.*", From 04040b97f7c717717cdf9887f86659bbd18909f5 Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:45:26 +0100 Subject: [PATCH 2/8] test removing numpy --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c07f3096f9d..79470981c42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,6 @@ module = [ "Nio.*", "nc_time_axis.*", "numbagg.*", - "numpy.*", "netCDF4.*", "netcdftime.*", "pandas.*", From 2c684674bc113e65436f1c4e672607c8a86b7a63 Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Thu, 24 Nov 2022 20:19:25 +0100 Subject: [PATCH 3/8] remove ignore for pycompat --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 79470981c42..fbce200e253 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,8 +67,6 @@ module = [ "zarr.*", ] -# version spanning code is hard to type annotate (and most of this module will -# be going away soon anyways) [[tool.mypy.overrides]] ignore_errors = true -module = "xarray.core.pycompat" +module = [] From d14f01c5eae8d0c4b84a79b208bdaed11d132217 Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Thu, 24 Nov 2022 20:25:10 +0100 Subject: [PATCH 4/8] fix pycompat typing error --- xarray/core/pycompat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xarray/core/pycompat.py b/xarray/core/pycompat.py index d426dc63bfb..30e7158104a 100644 --- a/xarray/core/pycompat.py +++ b/xarray/core/pycompat.py @@ -2,7 +2,7 @@ from importlib import import_module from types import ModuleType -from typing import TYPE_CHECKING, Any, Literal, Type +from typing import TYPE_CHECKING, Any, Literal, Type, Tuple import numpy as np from packaging.version import Version @@ -13,7 +13,7 @@ if TYPE_CHECKING: ModType = Literal["dask", "pint", "cupy", "sparse"] - DuckArrayTypes = tuple[Type[Any], ...] # TODO: improve this? maybe Generic + DuckArrayTypes = Tuple[Type[Any], ...] # TODO: improve this? maybe Generic class DuckArrayModule: From c5da458f81cc646d4fbbf2d2cd1643b6dced5a32 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:26:24 +0000 Subject: [PATCH 5/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- xarray/core/pycompat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/pycompat.py b/xarray/core/pycompat.py index 30e7158104a..474b694dcf0 100644 --- a/xarray/core/pycompat.py +++ b/xarray/core/pycompat.py @@ -2,7 +2,7 @@ from importlib import import_module from types import ModuleType -from typing import TYPE_CHECKING, Any, Literal, Type, Tuple +from typing import TYPE_CHECKING, Any, Literal, Tuple, Type import numpy as np from packaging.version import Version From 3d7d0ea9687af1aad978ee8c564a3c49a5a01873 Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Sat, 26 Nov 2022 13:45:35 +0100 Subject: [PATCH 6/8] remove pint --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fbce200e253..c87d2322285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,6 @@ module = [ "netCDF4.*", "netcdftime.*", "pandas.*", - "pint.*", "pooch.*", "PseudoNetCDF.*", "pydap.*", From accd8ba4b59ebefcc46479828fcbf0857d4a0c08 Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Sat, 26 Nov 2022 14:03:48 +0100 Subject: [PATCH 7/8] test removing pandas --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c87d2322285..2b0da269670 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,6 @@ module = [ "numbagg.*", "netCDF4.*", "netcdftime.*", - "pandas.*", "pooch.*", "PseudoNetCDF.*", "pydap.*", From 397cdd6509c017da266401044e3322787ad6f70a Mon Sep 17 00:00:00 2001 From: Illviljan <14371165+Illviljan@users.noreply.github.com> Date: Sat, 26 Nov 2022 14:08:23 +0100 Subject: [PATCH 8/8] Revert "test removing pandas" This reverts commit accd8ba4b59ebefcc46479828fcbf0857d4a0c08. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2b0da269670..c87d2322285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ module = [ "numbagg.*", "netCDF4.*", "netcdftime.*", + "pandas.*", "pooch.*", "PseudoNetCDF.*", "pydap.*",