msprime
msprime copied to clipboard
Type annotations for top-level functions
#1371 added some type annotations for data classes. We should also annotate the top-level functions, as much as we can (some will be a little convoluted).
Also add some documentation on type annotations to the developer docs, noting where we are at and where we'd like to be in the future (basically, all new code should aim to be fully annotated).
Dropping this for 1.0, it's not worth the extra effort.
Auto-detecting the types from the test suite worked well when I tried it out on tskit, something worth considering here.
Do you have some links for software for this @benjeffery? It would be nice to do, in the near future, it's just not worth holding up 1.0 for.
it's just not worth holding up 1.0 for.
Agreed!
https://github.com/dropbox/pyannotate, https://github.com/google/pytype and https://github.com/Instagram/MonkeyType are the projects in this space. A year ago I had success with the first, but things may have moved on.