summaryrefslogtreecommitdiff
path: root/astroid/helpers.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-08-12 20:59:36 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-08-12 20:59:36 +0300
commit7ec07a045399be5937465b65a81239b6ef3f8036 (patch)
tree645f79014628d18736a5d43d08006efbb12c28f3 /astroid/helpers.py
parenta6721e299db6f4bb0f6b59416f9cb0ad417c77ff (diff)
downloadastroid-git-7ec07a045399be5937465b65a81239b6ef3f8036.tar.gz
Move InferenceContext and CallContext into astroid.context
In order to reduce circular dependencies between components, CallContext is moved into a new module, astroid.context. At the same time, for increasing the cohesion inside astroid.bases, InferenceContext was moved as well into astroid.context.
Diffstat (limited to 'astroid/helpers.py')
-rw-r--r--astroid/helpers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/helpers.py b/astroid/helpers.py
index 21dd76c4..93b67094 100644
--- a/astroid/helpers.py
+++ b/astroid/helpers.py
@@ -23,6 +23,7 @@ Various helper utilities.
import six
from astroid import bases
+from astroid import context as contextmod
from astroid import exceptions
from astroid import manager
from astroid import raw_building
@@ -61,7 +62,7 @@ def _function_type(function, builtins):
def _object_type(node, context=None):
astroid_manager = manager.AstroidManager()
builtins = astroid_manager.astroid_cache[BUILTINS]
- context = context or bases.InferenceContext()
+ context = context or contextmod.InferenceContext()
for inferred in node.infer(context=context):
if isinstance(inferred, scoped_nodes.Class):