From 99eba4e0ebcbbe1d10155eee0599274102ffb365 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 15 May 2020 00:26:14 +0200 Subject: [PATCH] Undefined api types should not return a random value --- jedi/inference/base_value.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/jedi/inference/base_value.py b/jedi/inference/base_value.py index e7ac4baa..a88b7a5a 100644 --- a/jedi/inference/base_value.py +++ b/jedi/inference/base_value.py @@ -143,17 +143,12 @@ class Value(HelperValueMixin): # Possible values: None, tuple, list, dict and set. Here to deal with these # very important containers. array_type = None + api_type = 'not_defined_please_report_bug' def __init__(self, inference_state, parent_context=None): self.inference_state = inference_state self.parent_context = parent_context - @property - def api_type(self): - # By default just lower name of the class. Can and should be - # overwritten. - return self.__class__.__name__.lower() - def py__getitem__(self, index_value_set, contextualized_node): from jedi.inference import analysis # TODO this value is probably not right.