summaryrefslogtreecommitdiff
path: root/astroid/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/context.py')
-rw-r--r--astroid/context.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/astroid/context.py b/astroid/context.py
index 82a80a06..4bda945f 100644
--- a/astroid/context.py
+++ b/astroid/context.py
@@ -1,7 +1,8 @@
-# Copyright (c) 2015-2016, 2018-2019 Claudiu Popa <pcmanticore@gmail.com>
+# Copyright (c) 2015-2016, 2018-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2015-2016 Ceridwen <ceridwenv@gmail.com>
# Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com>
# Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com>
+# Copyright (c) 2020 Bryce Guinta <bryce.guinta@protonmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
@@ -107,17 +108,6 @@ class InferenceContext:
clone.extra_context = self.extra_context
return clone
- def cache_generator(self, key, generator):
- """Cache result of generator into dictionary
-
- Used to cache inference results"""
- results = []
- for result in generator:
- results.append(result)
- yield result
-
- self.inferred[key] = tuple(results)
-
@contextlib.contextmanager
def restore_path(self):
path = dict(self.path)