1
0
forked from VimPlug/jedi

Revisit caching of mixed

This commit is contained in:
Dave Halter
2020-01-25 17:58:12 +01:00
parent 329329c195
commit 517fa27dc6

View File

@@ -31,8 +31,8 @@ class MixedObject(ValueWrapper):
A ``MixedObject`` is used in two ways: A ``MixedObject`` is used in two ways:
1. It uses the default logic of ``parser.python.tree`` objects, 1. It uses the default logic of ``parser.python.tree`` objects,
2. except for getattr calls. The names dicts are generated in a fashion 2. except for getattr calls and signatures. The names dicts are generated
like ``CompiledObject``. in a fashion like ``CompiledObject``.
This combined logic makes it possible to provide more powerful REPL This combined logic makes it possible to provide more powerful REPL
completion. It allows side effects that are not noticable with the default completion. It allows side effects that are not noticable with the default
@@ -143,16 +143,12 @@ class MixedObjectFilter(compiled.CompiledObjectFilter):
@inference_state_function_cache() @inference_state_function_cache()
def _load_module(inference_state, path): def _load_module(inference_state, path):
module_node = inference_state.parse( return inference_state.parse(
path=path, path=path,
cache=True, cache=True,
diff_cache=settings.fast_parser, diff_cache=settings.fast_parser,
cache_path=settings.cache_directory cache_path=settings.cache_directory
).get_root_node() ).get_root_node()
# python_module = inspect.getmodule(python_object)
# TODO we should actually make something like this possible.
# inference_state.modules[python_module.__name__] = module_node
return module_node
def _get_object_to_check(python_object): def _get_object_to_check(python_object):