1.1 --- a/deducer.py Tue Nov 15 00:00:21 2016 +0100
1.2 +++ b/deducer.py Tue Nov 15 00:01:00 2016 +0100
1.3 @@ -1006,7 +1006,27 @@
1.4 self._init_attr_type_index(self.attr_class_types, self.importer.all_class_attrs)
1.5 self._init_attr_type_index(self.attr_instance_types, self.importer.all_instance_attrs, True)
1.6 self._init_attr_type_index(self.attr_instance_types, self.importer.all_combined_attrs, False)
1.7 - self._init_attr_type_index(self.attr_module_types, self.importer.all_module_attrs)
1.8 +
1.9 + # Combine module members with name references to give the complete set
1.10 + # of attributes provided by a module, even if some of them are just
1.11 + # references to an object located elsewhere.
1.12 +
1.13 + references = {}
1.14 +
1.15 + for module in self.importer.modules.values():
1.16 + references[module.name] = set()
1.17 +
1.18 + # The names used in a module include references.
1.19 +
1.20 + if module.names_used.has_key(module.name):
1.21 + references[module.name].update(module.names_used[module.name])
1.22 +
1.23 + # The recorded module attributes concern the module members.
1.24 +
1.25 + if self.importer.all_module_attrs.has_key(module.name):
1.26 + references[module.name].update(self.importer.all_module_attrs[module.name])
1.27 +
1.28 + self._init_attr_type_index(self.attr_module_types, references)
1.29
1.30 def _init_attr_type_index(self, attr_types, attrs, assignment=None):
1.31