1

Closed

IterableInfo.IndexTypes are not saved in the cached analysis

description

SaveAnalysis.GenerateTypeName does not attempt to write them and the type database has no way of recreating them.

This breaks cases like _pyio.TextIOBase.readlines(), where we only write out that the returned type is a list and not list[str] and list[bytes].
Closed Jun 5 at 4:36 PM by RickWinter

comments

Zooba wrote Apr 15, 2013 at 11:30 PM

Fixed in 2.0 feature branch.

huguesv wrote Sep 27, 2013 at 10:32 PM

From Steve:
Looking closer at the original issue, this one has definitely been added and works in most cases. The IO classes are very convoluted though, and we don’t always figure out the correct return type (or it gets called so often that we combine the return type and lose the info anyway).

Anything in the stdlib or site-packages that returns a tuple can show this best.

(Same tip about iterating/indexing applies. Either of these will be more reliable than just looking at the quick info – we don’t always display the index types there.)