From 14ca8e64993454730157a3d5293c8a54846a0180 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 8 May 2020 18:00:35 +0200 Subject: [PATCH] Add a comment --- jedi/inference/gradual/typing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jedi/inference/gradual/typing.py b/jedi/inference/gradual/typing.py index edb3dc2e..15922528 100644 --- a/jedi/inference/gradual/typing.py +++ b/jedi/inference/gradual/typing.py @@ -185,9 +185,6 @@ class _TypingClassMixin(ClassMixin): class TypingClassValueWithIndex(_TypingClassMixin, TypingValueWithIndex): def infer_type_vars(self, value_set): - # Circular - from jedi.inference.gradual.annotation import merge_pairwise_generics, merge_type_var_dicts - type_var_dict = {} annotation_generics = self.get_generics() @@ -197,6 +194,9 @@ class TypingClassValueWithIndex(_TypingClassMixin, TypingValueWithIndex): annotation_name = self.py__name__() if annotation_name == 'Type': return annotation_generics[0].infer_type_vars( + # This is basically a trick to avoid extra code: We execute the + # incoming classes to be able to use the normal code for type + # var inference. value_set.execute_with_values(), )