Use even more stubs to get more complex completions for e.g. strings working

This commit is contained in:
Dave Halter committed 2019-06-07 02:37:51 +02:00
1 parent 97f342fc4c
commit 94dfe7bf69
10 files changed
+48 -15

No files matched your search

+7
View File
@@ -19,6 +19,8 @@ from jedi.evaluate.utils import safe_property
from jedi.evaluate.cache import evaluator_as_method_param_cache
from jedi.cache import memoize_method
_sentinel = object()
class HelperContextMixin(object):
def get_root_context(self):
@@ -185,6 +187,11 @@ class Context(HelperContextMixin, BaseContext):
return clean_scope_docstring(self.tree_node)
return None
def get_safe_value(self, default=_sentinel):
if default is _sentinel:
raise ValueError("There exists no safe value for context %s" % self)
return default
def py__call__(self, arguments):
debug.warning("no execution possible %s", self)
return NO_CONTEXTS