Add static type annotations
- Dominant language
- Python
- Stars
- 13.9k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
I am having trouble with using Dask in a project that uses PyRight because Dask does not use static type annotations/
Take, `da.from_array`, for example:
https://github.com/dask/dask/blob/b2ec1e1a2361db1e269ba86c7c59d3f6df70a02d/dask/array/core.py#L3307-L3317
Or `array.rechunk`:
https://github.com/dask/dask/blob/b2ec1e1a2361db1e269ba86c7c59d3f6df70a02d/dask/array/rechunk.py#L268-L275
PyRight complains if you use anything but a `str` for `chunks`:

```py
Argument of type "tuple[Literal[1], Literal[-1], Literal[-1]]" cannot be assigned to parameter "chunks" of type "str" in function "from_array"
"tuple[Literal[1], Literal[-1], Literal[-1]]" is incompatible with "str"
```
This happens because in `from_array` and `rechunk`, `chunks="auto"` infers to a `str` type.
Is there an awareness of this problem? Is there a known solution? If not, is there a plan to fix this?
Contributor guide
Assessment
This issue has not been assessed yet.