dianna
dianna copied to clipboard
Use type hinting with mypy
It is getting a bit convoluted what the input types of specific functions are. We now have options: numpy array, xarray, string, list of strings. I think it would help both development and users to specify at certain places what types we expect.
Indeed, probably all the places where we currently feel that we have to specify it in the docstring (input arguments like matrix (np.array): blabla
) we should have it as a type hint instead.
Seems important as we are adding soon more modalities.
We discussed this today in the retrospective. We agreed this is a good idea to add gradually.
My suggestion would be to just enable mypy and then see how it goes.
@geek-yang @cwmeijer