home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1266112842

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/7052#issuecomment-1266112842 https://api.github.com/repos/pydata/xarray/issues/7052 1266112842 IC_kwDOAMm_X85Ld1lK 43316012 2022-10-03T22:02:12Z 2022-10-04T10:13:00Z COLLABORATOR

wait.... did mypy 0.981 change the behavior of overloads with None and Hashable? I now get errors for ```python from typing import Hashable

@overload def x(a: Hashable) -> Hashable: ...

@overload def x(a: None = None) -> None: ...

def x(a: Hashable | None = None) -> Hashable | None: return a ``` but this works with 0.971. I cannot find anything on the changelog... Interesting that does not break other things in xarray since None is always treated differently! (In theory mypy is right, since None is actually hashable...)

Edit: see https://github.com/python/mypy/issues/13805, adding some type: ignore for this is the "solution"

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