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
I think it would be really helpful to add type annotations to the whole codebase. This would improve the documentation for the whole of parcels and make it easier for people to see how to use parameters, and also make it easier for people to adopt the package.
Adding type annotations is also useful for typehints within IDEs, as at the moment its just saying that the parameters can be of any type:
As a bit of an anecdote, I was struggling for a while to determine what format the show_time parameter was in Field.show() (a datetime object? An integer?). Only after experimenting for 15 mins did I find out it didn't support datetime objects, but only floats, and that the number represented the seconds passed since the start. There wasn't mention for this in the documentation.
I'm happy to contribute to this, but this may best be done by an individual who's familiar with the whole codebase.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I think it would be really helpful to add type annotations to the whole codebase. This would improve the documentation for the whole of parcels and make it easier for people to see how to use parameters, and also make it easier for people to adopt the package.
Adding type annotations is also useful for typehints within IDEs, as at the moment its just saying that the parameters can be of any type:
![image](https://user-images.githubusercontent.com/36369090/184258166-368d9cbf-474a-4191-8ecd-093b64ff47f1.png)
As a bit of an anecdote, I was struggling for a while to determine what format the
show_time
parameter was inField.show()
(a datetime object? An integer?). Only after experimenting for 15 mins did I find out it didn't support datetime objects, but only floats, and that the number represented the seconds passed since the start. There wasn't mention for this in the documentation.I'm happy to contribute to this, but this may best be done by an individual who's familiar with the whole codebase.
Beta Was this translation helpful? Give feedback.
All reactions