Closed dgasmith closed 3 years ago
There are NumPy types that we should use: https://github.com/numpy/numpy/blob/main/numpy/typing/_array_like.py
Our NumPy minimum version is quite old, let me see if we can do anything to improve the situation in another PR.
Description
For the upcoming release, I did wish to attempt to finalize a round of MyPy, that is, all functions typed at least in a generic way. There still exist too many
Any
types, but we're making headway. In particular, typing the paths proved to be instructive and helped to unpack some type thrashing. This also helped improve the readability of the dynamic path slightly; I still wish to do another pass or two to make it more self-evident what is happening as this codebase matures.The last item I wish to do in this PR is switch from YAPF to the black formatter. Black is raising in popularity over the past few years and generally find it much more stable than YAPF. A test run only shows ~50 lines of reasonable changed beyond mapping
' -> "
, but helps tremendously for our length arg-based function calls.As a note, I'm not adding a
py.typed
yet- I would like to handle the ArrayType better than we currently do before I declare the types "ready".Questions
Status