Clarify variable name

This commit is contained in:
Peter Law
2020-03-07 16:32:38 +00:00
parent 54e29eede1
commit 3b4fa2aa9c

View File

@@ -469,14 +469,14 @@ def _infer_type_vars(annotation_value, value_set, is_class_value=False):
else: else:
py_class = element py_class = element
for klass in py_class.py__mro__(): for parent_class in py_class.py__mro__():
class_name = klass.py__name__() class_name = parent_class.py__name__()
if annotation_name == class_name: if annotation_name == class_name:
if not isinstance(klass, DefineGenericBase): if not isinstance(parent_class, DefineGenericBase):
continue continue
annotation_generics = annotation_value.get_generics() annotation_generics = annotation_value.get_generics()
actual_generics = klass.get_generics() actual_generics = parent_class.get_generics()
for annotation_generics_set, actual_generic_set in zip(annotation_generics, actual_generics): for annotation_generics_set, actual_generic_set in zip(annotation_generics, actual_generics):
for nested_annotation_value in annotation_generics_set: for nested_annotation_value in annotation_generics_set: