1
0
forked from VimPlug/jedi

context -> value

This commit is contained in:
Dave Halter
2019-08-15 01:23:06 +02:00
parent 9e23f4d67b
commit ad4f546aca
68 changed files with 1931 additions and 1931 deletions

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_context=None):
def wrapper(infer_state, obj, parent_value=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_context)
result = func(infer_state, obj, parent_value)
else:
result = func(infer_state, obj)
# Need to cache all of them, otherwise the id could be overwritten.
cache[key] = result, obj, parent_context
cache[key] = result, obj, parent_value
return result
return wrapper