From e5cc0d2fffdbcd5407aac79dc5bc78dc42503787 Mon Sep 17 00:00:00 2001 From: Andrew Haigh Date: Wed, 16 Jun 2021 09:02:24 +1000 Subject: Refactor brain-less AstroidManager test fixture --- astroid/manager.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'astroid/manager.py') diff --git a/astroid/manager.py b/astroid/manager.py index 7a64f0c1..e2a66d96 100644 --- a/astroid/manager.py +++ b/astroid/manager.py @@ -64,11 +64,17 @@ class AstroidManager: 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 self.max_inferable_values = 100 + @property + def register_transform(self): + # This and unregister_transform below are exported for convenience + return self._transform.register_transform + + @property + def unregister_transform(self): + return self._transform.unregister_transform + @property def builtins_module(self): return self.astroid_cache["builtins"] -- cgit v1.2.1