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

mypy - Remove some ignored packages and modules #7319

Merged
merged 8 commits into from
Nov 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ module = [
"cfgrib.*",
"cftime.*",
"cupy.*",
"dask.*",
"distributed.*",
"fsspec.*",
"h5netcdf.*",
"h5py.*",
Expand All @@ -52,11 +50,9 @@ module = [
"Nio.*",
"nc_time_axis.*",
"numbagg.*",
"numpy.*",
"netCDF4.*",
"netcdftime.*",
"pandas.*",
"pint.*",
"pooch.*",
"PseudoNetCDF.*",
"pydap.*",
Expand All @@ -70,8 +66,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 = []
4 changes: 2 additions & 2 deletions xarray/core/pycompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, Tuple, Type

import numpy as np
from packaging.version import Version
Expand All @@ -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:
Expand Down