# HG changeset patch # User Paul Boddie # Date 1476887821 -7200 # Node ID aff9bdfadd3fc35f3602bab2a64bc603797369cc # Parent 882982b9005670f3ecbdcd6114f3cc7ad59cdc2b Make function parameters available via the importer. diff -r 882982b90056 -r aff9bdfadd3f importer.py --- a/importer.py Mon Oct 17 23:26:22 2016 +0200 +++ b/importer.py Wed Oct 19 16:37:01 2016 +0200 @@ -69,6 +69,7 @@ self.classes = {} self.function_parameters = {} self.function_defaults = {} + self.function_locals = {} self.function_targets = {} self.function_arguments = {} diff -r 882982b90056 -r aff9bdfadd3f inspector.py --- a/inspector.py Mon Oct 17 23:26:22 2016 +0200 +++ b/inspector.py Wed Oct 19 16:37:01 2016 +0200 @@ -593,11 +593,13 @@ # Copy and propagate the parameters. self.importer.function_parameters[function_name] = \ - self.function_parameters[function_name] = argnames[:] + self.function_parameters[function_name] = argnames[:] # Define all arguments/parameters in the local namespace. - locals = self.function_locals[function_name] = {} + locals = \ + self.importer.function_locals[function_name] = \ + self.function_locals[function_name] = {} # Insert "self" into method locals. diff -r 882982b90056 -r aff9bdfadd3f modules.py --- a/modules.py Mon Oct 17 23:26:22 2016 +0200 +++ b/modules.py Wed Oct 19 16:37:01 2016 +0200 @@ -504,7 +504,8 @@ function, name, value = self._get_fields(line, 3) init_item(self.function_locals, function, dict) if name != "{}": - self.function_locals[function][name] = decode_reference(value) + self.importer.function_locals[function] = \ + self.function_locals[function][name] = decode_reference(value) line = f.readline().rstrip() def _get_function_targets(self, f):