def _filter_uninferable_nodes(elts, context): for elt in elts: if elt is util.Uninferable: yield nodes.Unknown() else: for inferred in elt.infer(context): if inferred is not util.Uninferable: yield inferred else: yield nodes.Unknown()
def test_unknown(): """Test Unknown node""" assert isinstance(next(nodes.Unknown().infer()), type(util.Uninferable)) assert isinstance(nodes.Unknown().name, str) assert isinstance(nodes.Unknown().qname(), str)