Checked this with both 0.14.1 and master branch.
Create foo.py:
from xarray import DataArray
and run:
which results in
foo.py:1: error: Module 'xarray' has no attribute 'DataArray'
Found 1 error in 1 file (checked 1 source file)
I did a bit of digging trying to make it work, it looks like what makes the above script work with mypy is adding
to xarray/__init__.py, otherwise mypy treats those imports as "private" (and is correct in doing so).
Should __all__ be added to the root __init__.py? To any __init__.py in subpackages as well?