1
0
forked from VimPlug/jedi

Small changes so some type var inferring works better

However this change is a bit controversial, because it involves some strange class matching that we might need to revisit
This commit is contained in:
Dave Halter
2018-09-23 00:41:32 +02:00
parent 994e7d1910
commit f435f23570
2 changed files with 9 additions and 2 deletions

View File

@@ -279,10 +279,12 @@ class TreeInstance(AbstractInstanceContext):
continue
all_annotations = pep0484.py__annotations__(execution.tree_node)
return pep0484.define_type_vars(
defined = pep0484.define_type_vars(
self.class_context,
pep0484.infer_type_vars_for_execution(execution, all_annotations),
)
debug.dbg('Inferred instance context as %s', defined, color='BLUE')
return defined
return self.class_context
def _get_annotation_init_functions(self):