1.1 --- a/inspector.py Sun Oct 23 14:54:04 2016 +0200
1.2 +++ b/inspector.py Sun Oct 23 14:56:33 2016 +0200
1.3 @@ -41,15 +41,8 @@
1.4
1.5 BasicModule.__init__(self, name, importer)
1.6
1.7 - self.in_assignment = False
1.8 self.in_class = False
1.9 self.in_conditional = False
1.10 - self.in_invocation = False
1.11 -
1.12 - # Attribute chain state management.
1.13 -
1.14 - self.chain_assignment = []
1.15 - self.chain_invocation = []
1.16
1.17 # Accesses to global attributes.
1.18
1.19 @@ -350,10 +343,11 @@
1.20 self.record_name(n.name)
1.21
1.22 elif isinstance(n, compiler.ast.AssAttr):
1.23 - if expr: self.process_structure_node(expr)
1.24 + if expr:
1.25 + expr = self.process_structure_node(expr)
1.26
1.27 in_assignment = self.in_assignment
1.28 - self.in_assignment = True
1.29 + self.in_assignment = expr
1.30 self.process_attribute_access(n)
1.31 self.in_assignment = in_assignment
1.32
1.33 @@ -989,26 +983,6 @@
1.34
1.35 tracker.resume_broken_branches()
1.36
1.37 - # Attribute chain handling.
1.38 -
1.39 - def reset_attribute_chain(self):
1.40 -
1.41 - "Reset the attribute chain for a subexpression of an attribute access."
1.42 -
1.43 - CommonModule.reset_attribute_chain(self)
1.44 - self.chain_assignment.append(self.in_assignment)
1.45 - self.chain_invocation.append(self.in_invocation)
1.46 - self.in_assignment = False
1.47 - self.in_invocation = False
1.48 -
1.49 - def restore_attribute_chain(self, attrs):
1.50 -
1.51 - "Restore the attribute chain for an attribute access."
1.52 -
1.53 - CommonModule.restore_attribute_chain(self, attrs)
1.54 - self.in_assignment = self.chain_assignment.pop()
1.55 - self.in_invocation = self.chain_invocation.pop()
1.56 -
1.57 # Branch tracking methods.
1.58
1.59 def start_tracking(self, names):