pylint-bot / test

0 stars 0 forks source link

Use UnionType when having multiple return values #154

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?)


This is partially related to #153.

Currently, in lot of places where we are expecting multiple values as an inference result, we either retrieve the first one, using next, or we are returning to the upstream caller an YES object, in case we have multiple values returned. This is partially a problem, because it leads to a partial understanding of the code by astroid. In this case, we should return an UnionType with all the possible values and we should operate on that UnionType result.