コード例 #1
0
 def open(self):
     """initialize counters"""
     self.stats = {"by_module": {}, "by_msg": {}}
     MANAGER.always_load_extensions = self.config.unsafe_load_any_extension
     MANAGER.max_inferable_values = self.config.limit_inference_results
     MANAGER.extension_package_whitelist.update(self.config.extension_pkg_whitelist)
     for msg_cat in MSG_TYPES.values():
         self.stats[msg_cat] = 0
コード例 #2
0
 def set_current_module(self, modname, filepath=None):
     """set the name of the currently analyzed module and
     init statistics for it
     """
     if not modname and filepath is None:
         return
     self.reporter.on_set_current_module(modname, filepath)
     self.current_name = modname
     self.current_file = filepath or modname
     self.stats["by_module"][modname] = {}
     self.stats["by_module"][modname]["statement"] = 0
     for msg_cat in MSG_TYPES.values():
         self.stats["by_module"][modname][msg_cat] = 0