From a9761079e61e7d137dde8d8e1f0aadd1ec020af9 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 15 Mar 2020 19:28:02 +0100 Subject: [PATCH] Remove follow_definition --- jedi/api/classes.py | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/jedi/api/classes.py b/jedi/api/classes.py index bbae6c4e..4f446f1d 100644 --- a/jedi/api/classes.py +++ b/jedi/api/classes.py @@ -387,6 +387,14 @@ class BaseDefinition(object): for n in names] def infer(self, **kwargs): # Python 2... + """ + Return the original definitions. I strongly recommend not using it for + your completions, because it might slow down |jedi|. If you want to + read only a few objects (<=20), it might be useful, especially to get + the original docstrings. The basic problem of this function is that it + follows all results. This means with 1000 completions (e.g. numpy), + it's just PITA-slow. + """ with debug.increase_indent_cm('infer for %s' % self._name): return self._infer(**kwargs) @@ -413,7 +421,7 @@ class BaseDefinition(object): @memoize_method def params(self): """ - Deprecated! Will raise a warning soon. Use get_signatures()[...].params. + .. deprecated:: Use get_signatures()[...].params. Raises :exc:`AttributeError` if the definition is not callable. Otherwise returns a list of :class:`.Definition` that represents the @@ -643,25 +651,6 @@ class Completion(BaseDefinition): def __repr__(self): return '<%s: %s>' % (type(self).__name__, self._name.get_public_name()) - @memoize_method - def follow_definition(self): - """ - Deprecated! - - Return the original definitions. I strongly recommend not using it for - your completions, because it might slow down |jedi|. If you want to - read only a few objects (<=20), it might be useful, especially to get - the original docstrings. The basic problem of this function is that it - follows all results. This means with 1000 completions (e.g. numpy), - it's just PITA-slow. - """ - warnings.warn( - "Deprecated since version 0.14.0. Use .infer.", - DeprecationWarning, - stacklevel=2 - ) - return self.infer() - class Definition(BaseDefinition): """