1
0
forked from VimPlug/jedi

Fix: dicts lookups were not working in all cases.

This commit is contained in:
Dave Halter
2015-12-08 22:37:30 +01:00
parent bef5fca516
commit c9a5caa96e
4 changed files with 22 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ import operator
from jedi._compatibility import unicode
from jedi.parser import tree
from jedi import debug
from jedi.evaluate.compiled import CompiledObject, create
from jedi.evaluate.compiled import CompiledObject, create, builtin_from_name
from jedi.evaluate import analysis
# Maps Python syntax to the operator module.
@@ -30,7 +30,7 @@ def literals_to_types(evaluator, result):
if is_literal(typ):
# Literals are only valid as long as the operations are
# correct. Otherwise add a value-free instance.
cls = create(evaluator, typ.name.value)
cls = builtin_from_name(evaluator, typ.name.value)
new_result |= evaluator.execute(cls)
else:
new_result.add(typ)