summaryrefslogtreecommitdiff
path: root/astroid/node_classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/node_classes.py')
-rw-r--r--astroid/node_classes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/astroid/node_classes.py b/astroid/node_classes.py
index a17af1a2..a3c02fcf 100644
--- a/astroid/node_classes.py
+++ b/astroid/node_classes.py
@@ -323,7 +323,9 @@ class NodeNG:
if key in context.inferred:
return iter(context.inferred[key])
- return context.cache_generator(key, self._infer(context, **kwargs))
+ gen = context.cache_generator(
+ key, self._infer(context, **kwargs))
+ return util.limit_inference(gen, MANAGER.max_inferable)
def _repr_name(self):
"""Get a name for nice representation.