1
0
forked from VimPlug/jedi

parent_value -> parent_context

This commit is contained in:
Dave Halter
2019-08-15 09:36:46 +02:00
parent 2e90e3b2b1
commit 600272366f
25 changed files with 181 additions and 181 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ def compiled_objects_cache(attribute_name):
Caching the id has the advantage that an object doesn't need to be
hashable.
"""
def wrapper(infer_state, obj, parent_value=None):
def wrapper(infer_state, obj, parent_context=None):
cache = getattr(infer_state, attribute_name)
# Do a very cheap form of caching here.
key = id(obj)
@@ -119,11 +119,11 @@ def compiled_objects_cache(attribute_name):
except KeyError:
# TODO wuaaaarrghhhhhhhh
if attribute_name == 'mixed_cache':
result = func(infer_state, obj, parent_value)
result = func(infer_state, obj, parent_context)
else:
result = func(infer_state, obj)
# Need to cache all of them, otherwise the id could be overwritten.
cache[key] = result, obj, parent_value
cache[key] = result, obj, parent_context
return result
return wrapper