forked from VimPlug/jedi
Add handling of nested generic tuples
This commit is contained in:
@@ -327,6 +327,9 @@ class Tuple(BaseTypingValueWithGenerics):
|
||||
from jedi.inference.gradual.annotation import merge_pairwise_generics, merge_type_var_dicts
|
||||
from jedi.inference.gradual.base import GenericClass
|
||||
|
||||
if is_class_value:
|
||||
value_set = value_set.execute_annotation()
|
||||
|
||||
if self._is_homogenous():
|
||||
# The parameter annotation is of the form `Tuple[T, ...]`,
|
||||
# so we treat the incoming tuple like a iterable sequence
|
||||
@@ -343,8 +346,12 @@ class Tuple(BaseTypingValueWithGenerics):
|
||||
|
||||
type_var_dict = {}
|
||||
for element in value_set:
|
||||
py_class = element.get_annotated_class_object()
|
||||
if not isinstance(py_class, GenericClass):
|
||||
if not is_class_value:
|
||||
py_class = element.get_annotated_class_object()
|
||||
|
||||
if not isinstance(py_class, GenericClass):
|
||||
py_class = element
|
||||
else:
|
||||
py_class = element
|
||||
|
||||
merge_type_var_dicts(
|
||||
|
||||
Reference in New Issue
Block a user