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/5871#issuecomment-958177932,https://api.github.com/repos/pydata/xarray/issues/5871,958177932,IC_kwDOAMm_X845HKKM,14371165,2021-11-02T21:23:34Z,2021-11-02T21:23:34Z,MEMBER,"> `from __future__ import annotations` does not actually directly enable the use of `|` for union, it changes the semantics of type annotations to [postpone evaluation](https://www.python.org/dev/peps/pep-0563/). In particular, you can then put just about anything in the type annotation without having any runtime behavior pandas uses `|` and `from __future__ import annotations` quite frequently in order to avoid the Union, for example: https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_core.py Having typing not doing any runtime calculations sounds great to me. We usually don't need the typing variables during runtime anyway. This can be merged as is. I just think it looks a little neater with |. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-955082380,https://api.github.com/repos/pydata/xarray/issues/5871,955082380,IC_kwDOAMm_X8447WaM,14371165,2021-10-29T22:28:59Z,2021-10-29T22:28:59Z,MEMBER,"This looks great, nice work! This can be saved for a future PR but one thing I notice is that it's possible to make the unions slightly more readable using the new |-operator: ```python dim: Union[None, Hashable, Sequence[Hashable]] = None ``` vs. ```python from __future__ import annotations dim: None | Hashable | Sequence[Hashable] = None ``` I'm unsure about the compatibility but I think it should be fine.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950262008,https://api.github.com/repos/pydata/xarray/issues/5871,950262008,IC_kwDOAMm_X844o9j4,14371165,2021-10-24T05:14:38Z,2021-10-24T05:44:19Z,MEMBER,"We can probably do the workaround way like in #5624: https://github.com/pydata/xarray/blob/b79155862e154db45dff3b526c2f9e8ef303808f/xarray/core/options.py#L7-L72 But I find `typing_extensions` getting rather important, most of the time when you google for the typing issue the _proper_ solutions often uses these new typing additions.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240 https://github.com/pydata/xarray/pull/5871#issuecomment-950201382,https://api.github.com/repos/pydata/xarray/issues/5871,950201382,IC_kwDOAMm_X844ouwm,14371165,2021-10-23T19:28:17Z,2021-10-23T19:28:17Z,MEMBER,"For the typing issues you can try out using Protocol: https://stackoverflow.com/questions/51930339/how-do-i-correctly-add-type-hints-to-mixin-classes","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1028110240