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 925664972,MDExOlB1bGxSZXF1ZXN0Njc0MDg1Mjk3,5502,Use integer type hints in chunk functions ,14371165,closed,0,,,7,2021-06-20T19:18:58Z,2021-07-02T16:07:43Z,2021-06-21T07:10:32Z,MEMBER,,0,pydata/xarray/pulls/5502,"Attempt to fix errors found in #5365. I've changed it to integers because when does it ever make sense to input 1.5 or a complex number? It will always be forced to integers anyway: https://github.com/dask/dask/blob/8aea537d925b794a94f828d35211a5da05ad9dce/dask/array/core.py#L2815 Integers don't work with Numbers: ``` xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1576: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] ``` Floats don't work with Numbers: ``` xarray/core/computation.py:1536: error: Dict entry 0 has incompatible type ""Hashable"": ""int""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type ""Hashable"": ""float""; expected ""Hashable"": ""Union[None, Number, str, Tuple[Number, ...]]"" [dict-item] xarray/core/computation.py:1578: error: Dict entry 0 has incompatible type ""Hashable"": ""float""; expected ""Hashable"": ""Union[None, Number, Tuple[Number, ...]]"" [dict-item] ``` This workaround seems related to: https://github.com/python/mypy/issues/3186 - [ ] Closes #xxxx - [ ] Tests added - [ ] Passes `pre-commit run --all-files` - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5502/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull