Use of type annotations across the codebase #1214
VeckoTheGecko
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 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