mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Simplify early-exit code by having it once
This commit is contained in:
@@ -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__()
|
||||
|
||||
Reference in New Issue
Block a user