Simplify early-exit code by having it once

This commit is contained in:
Peter Law
2020-03-22 15:49:31 +00:00
parent 3c90a84f68
commit 525b88e9f1

View File

@@ -185,12 +185,14 @@ class TypingClassValueWithIndex(_TypingClassMixin, TypingValueWithIndex):
from jedi.inference.gradual.annotation import merge_pairwise_generics, merge_type_var_dicts
from jedi.inference.gradual.base import GenericClass
annotation_name = self.py__name__()
type_var_dict = {}
annotation_generics = self.get_generics()
if not annotation_generics:
return type_var_dict
annotation_name = self.py__name__()
if annotation_name == 'Type':
if annotation_generics:
if is_class_value:
for element in value_set:
element_name = element.py__name__()