mlx
mlx copied to clipboard
Remove unused import
Proposed changes
Remove unused import.
Checklist
Put an x in the boxes that apply.
- [x] I have read the CONTRIBUTING document
- [x] I have run
pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes - [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have updated the necessary documentation (if needed)
I'm not following exactly what the purpose of this diff is. If you import the subpackage members without putting them in __all__ then you get a warning?
__all__ controls what will be imported when you use from a import *.
all controls what will be imported when you use from a import *.
Indeed I get what __all__ does. What I don't get is why you added a bunch of stuff to it. Can you explain that part?
As far as I can tell this doesn't change the behavior of e.g. from mlx.nn import * since by default all of the names that don't start with _ are included.
Oh, sorry for not making myself clear. I'd like to remove the all warning that the variables are imported but not used.
What about this instead (from Google search):
# pyright: reportUnusedVariable=false
Ok. I will just delete the unused import. Leave other stuff unchanged.