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
At the moment the docstring of the functions tskit.all_tree_shapes and tskit.all_tree_labellings claims the :rtype: is a tskit.Tree, but it's actually an iterator over trees (or more specifically a generator of trees).
While aiming to correct this, I also notice that the rtype for TreeSequence.trees() is (wrongly, surely?)
I haven't made this into a PR because it's unclear to me if we should be using typing.Iterable or collections.abc.Iterable (see e.g. https://docs.python.org/3/library/typing.html#typing.Iterable which says that the typing version with [] is deprecated as of python 3.9). Also there's Iterable, Iterator, and Generator, so I guess we need to pick which is the correct one? If we decide on which is the correct version, I'll make a PR.
It's very messy and I think it'll take a long time to get all this sorted out. In the meantime I don't think any of this really stops people getting work done. Ultimately we'll want to give proper type annotations I think, but I'd rather let the technology and ecosystems mature a bit more before putting much effort into it.
Activity
jeromekelleher commentedon Oct 25, 2021
It's very messy and I think it'll take a long time to get all this sorted out. In the meantime I don't think any of this really stops people getting work done. Ultimately we'll want to give proper type annotations I think, but I'd rather let the technology and ecosystems mature a bit more before putting much effort into it.
hyanwong commentedon Oct 25, 2021
Yep, I just wanted to correct the combinatorics values to something - don't much care what.
jeromekelleher commentedon Oct 25, 2021
Pick one of the existing conventions, I don't mind which.