home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 549712566

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
549712566 MDU6SXNzdWU1NDk3MTI1NjY= 3695 mypy --strict fails on scripts/packages depending on xarray; __all__ required 2418513 closed 0 6213168   3 2020-01-14T17:27:44Z 2020-01-17T20:42:25Z 2020-01-17T20:42:25Z NONE      

Checked this with both 0.14.1 and master branch.

Create foo.py:

python from xarray import DataArray

and run:

sh $ mypy --strict foo.py

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

python __all__ = ('DataArray',)

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?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3695/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.76ms · About: xarray-datasette