# HG changeset patch # User Paul Boddie # Date 1394752882 -3600 # Node ID 0108941fb189fee338de940d94ee823c9fe0f951 # Parent d4a8eaf02175860f3fa747d25c4123a8b5fc5aa4 Made use of the _access_attrs annotation. diff -r d4a8eaf02175 -r 0108941fb189 micropython/report.py --- a/micropython/report.py Thu Mar 13 23:56:32 2014 +0100 +++ b/micropython/report.py Fri Mar 14 00:21:22 2014 +0100 @@ -1157,13 +1157,8 @@ def _visitAttr(self, node, label): self.record_unknown_targets(node) - attributes = node._value_deduced and [self.get_attribute_and_value(node._value_deduced)] or \ - node._attr_deduced and [self.get_attribute_and_value(node._attr_deduced)] or \ - node._attrs_deduced or \ - map(self.get_attribute_and_value, node._attrs_deduced_from_specific_usage or []) - - possible_types = self._attributes_to_names(attributes, True) - attribute_names = self._attributes_to_names(attributes) + possible_types = self._attributes_to_names(node._access_attrs, True) + attribute_names = self._attributes_to_names(node._access_attrs) wraps_getattr = self._has_descendant(node.expr, compiler.ast.Getattr) @@ -1176,7 +1171,7 @@ self.stream.write(".") self._attribute_start(node.attrname, attribute_names) - self._span(node.attrname, "attrname" + ((not attributes or node._access_type == "impossible") and " no-attributes" or "")) + self._span(node.attrname, "attrname" + ((not node._access_attrs or node._access_type == "impossible") and " no-attributes" or "")) self._attribute_end(attribute_names) if not wraps_getattr: