forked from VimPlug/jedi
Implement type[...]
This commit is contained in:
@@ -149,6 +149,10 @@ class InferenceState:
|
||||
def typing_tuple(self):
|
||||
return self.typing_module.py__getattribute__("Tuple")
|
||||
|
||||
@inference_state_function_cache()
|
||||
def typing_type(self):
|
||||
return self.typing_module.py__getattribute__("Type")
|
||||
|
||||
def reset_recursion_limitations(self):
|
||||
self.recursion_detector = recursion.RecursionDetector()
|
||||
self.execution_recursion_detector = recursion.ExecutionRecursionDetector(self)
|
||||
|
||||
@@ -285,7 +285,6 @@ class ClassMixin:
|
||||
if not is_instance and include_type_when_class:
|
||||
from jedi.inference.compiled import builtin_from_name
|
||||
type_ = builtin_from_name(self.inference_state, 'type')
|
||||
assert isinstance(type_, ClassValue)
|
||||
if type_ != self:
|
||||
# We are not using execute_with_values here, because the
|
||||
# plugin function for type would get executed instead of an
|
||||
|
||||
Reference in New Issue
Block a user