dianna icon indicating copy to clipboard operation
dianna copied to clipboard

Use type hinting with mypy

Open cwmeijer opened this issue 3 years ago • 3 comments

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.

cwmeijer avatar Dec 23 '21 10:12 cwmeijer

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.

egpbos avatar Dec 23 '21 16:12 egpbos

Seems important as we are adding soon more modalities.

elboyran avatar Oct 18 '22 08:10 elboyran

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

stefsmeets avatar Mar 14 '23 14:03 stefsmeets