1
0
forked from VimPlug/jedi

Create the basics to work with TypedDict in the future

This commit is contained in:
Dave Halter
2020-01-26 19:25:23 +01:00
parent 18f84d3af7
commit 8eb980db73
6 changed files with 156 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ from jedi.inference.compiled.access import COMPARISON_OPERATORS
from jedi.inference.cache import inference_state_method_cache
from jedi.inference.gradual.stub_value import VersionInfo
from jedi.inference.gradual import annotation
from jedi.inference.gradual.typing import TypedDictClass
from jedi.inference.names import TreeNameDefinition
from jedi.inference.context import CompForContext
from jedi.inference.value.decorator import Decoratee
@@ -748,6 +749,8 @@ def _apply_decorators(context, node):
parent_context=context,
tree_node=node
)
if decoratee_value.is_typeddict():
decoratee_value = TypedDictClass(decoratee_value)
else:
decoratee_value = FunctionValue.from_context(context, node)
initial = values = ValueSet([decoratee_value])