You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a little surprised that mypy cares about __all__. For our __init__.py file, we are actually pretty careful to only define variables that are in xarray's public API, so __all__ was otherwise redundant.
In principle I have no objection to adding this, but it would be nice to if you could dig up a reference that explains mypy's behavior.
Checked this with both 0.14.1 and master branch.
Create
foo.py
:and run:
which results in
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?The text was updated successfully, but these errors were encountered: