home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 998193097

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/6086#issuecomment-998193097 https://api.github.com/repos/pydata/xarray/issues/6086 998193097 IC_kwDOAMm_X847fzfJ 35968931 2021-12-20T19:04:38Z 2021-12-20T19:04:38Z MEMBER

I started adding the test implementation, but when I run the new test I get the exact isinstance error I was expecting:

``` ds = <xarray.Dataset> Dimensions: () Data variables: a int64 0 b int64 1

def _assert_dataset_invariants(ds: Dataset):
  assert isinstance(ds._variables, dict), type(ds._variables)

E AssertionError: <class 'xarray.tests.test_dataset.CustomMirroredMapping'>

/home/tom/Documents/Work/Code/xarray/xarray/testing.py:309: AssertionError `` I *think* that with@runtime_checkable` then once mypy considers these the same type then this would pass, but I might have completely misunderstood how that works (meaning then we would probably need to relax the isinstance check).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1084220684
Powered by Datasette · Queries took 0.754ms · About: xarray-datasette