home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1382070832

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/7368#issuecomment-1382070832 https://api.github.com/repos/pydata/xarray/issues/7368 1382070832 IC_kwDOAMm_X85SYLow 4160723 2023-01-13T16:13:16Z 2023-01-13T16:13:16Z MEMBER

Thanks for the review @shoyer. I addressed your comments.

Everything seems OK except a rather annoying mypy error that I'm struggling with:

The DataAlignable type variable should now encompass both DataWithCoords and Coordinates, since in this PR we add alignment support for the latter. I somewhat naively tried the options below without success:

  • DataAlignable = TypeVar("DataAlignable", bound=DataWithCoords | Coordinates) -> doesn't work since we cannot mix DataWithCoords and Coordinates when aligning each object (input type = output type)
  • DataAlignable = TypeVar("DataAlignable", bound=DataWithCoords, Coordinates) -> doesn't work with subclasses
  • DataAlignable = TypeVar("DataAlignable", Dataset, DataArray, Coordinates) -> doesn't work with generic types T_Dataset, etc.?
  • I even tried using a Protocol

@headtr1ck @Illviljan any idea?

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