mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-10 00:53:24 +08:00
Fix a potential issue with tuples
This commit is contained in:
@@ -331,9 +331,17 @@ class Tuple(BaseTypingValueWithGenerics):
|
|||||||
|
|
||||||
type_var_dict = {}
|
type_var_dict = {}
|
||||||
for element in value_set:
|
for element in value_set:
|
||||||
py_class = element.get_annotated_class_object()
|
try:
|
||||||
if not isinstance(py_class, GenericClass):
|
method = element.get_annotated_class_object
|
||||||
py_class = element
|
except AttributeError:
|
||||||
|
# This might still happen, because the tuple name matching
|
||||||
|
# above is not 100% correct, so just catch the remaining
|
||||||
|
# cases here.
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
py_class = method()
|
||||||
|
if not isinstance(py_class, GenericClass):
|
||||||
|
py_class = element
|
||||||
|
|
||||||
merge_type_var_dicts(
|
merge_type_var_dicts(
|
||||||
type_var_dict,
|
type_var_dict,
|
||||||
|
|||||||
Reference in New Issue
Block a user