You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we switched to nanobind, the stubs in site-packages/mlx/core/__init__.pyi should have the right type information.
There is also an open issue (#1240) about getting complete typing info for MLX python packages, there are a few annotations missing here and there. I will leave that issue open and close this one as a dup / partially resolved.
I want to use
mypy --strict
to check my code that depends on MLX. However, the stub generated bypybind11-stubgen
at https://github.com/ml-explore/mlx/blob/3b661b73943c8b91d45bdf55da670e8cb308c2a8/setup.py#L137C26-L137C42 does not include accurate type annotation.In the file
~/miniforge3/envs/mlx-medusa-plus/lib/python3.10/site-packages/mlx/core/__init__.pyi
, I have the following signature ofmx.repeat
:However,
mypy --strict
would expect something like the following:I noticed that the
help
function could reveal accurate type annotations. The run ofhelp(mx.repeat)
gave me the following:Where does
help
get the information from? Couldpybind11-stubgen
make use of such information to output accurately annotated functions? Thanks!The text was updated successfully, but these errors were encountered: