def brainless_manager(self): manager = AstroidManager() # avoid caching into the AstroidManager borg since we get problems # with other tests : manager.__dict__ = {} manager._failed_import_hooks = [] manager.astroid_cache = {} manager._mod_file_cache = {} manager._transform = transforms.TransformVisitor() return manager
def brainless_manager(): m = manager.AstroidManager() # avoid caching into the AstroidManager borg since we get problems # with other tests : m.__dict__ = {} m._failed_import_hooks = [] m.astroid_cache = {} m._mod_file_cache = {} m._transform = transforms.TransformVisitor() m.extension_package_whitelist = {} return m
def __init__(self): self.__dict__ = AstroidManager.brain if not self.__dict__: # NOTE: cache entries are added by the [re]builder self.astroid_cache = {} self._mod_file_cache = {} self._failed_import_hooks = [] self.always_load_extensions = False self.optimize_ast = False self.extension_package_whitelist = set() self._transform = transforms.TransformVisitor() # Export these APIs for convenience self.register_transform = self._transform.register_transform self.unregister_transform = self._transform.unregister_transform
def setUp(self): self.transformer = transforms.TransformVisitor()