forked from VimPlug/jedi
Remove get_signatures again from names
This commit is contained in:
@@ -446,7 +446,7 @@ class BaseDefinition(object):
|
|||||||
def get_signatures(self):
|
def get_signatures(self):
|
||||||
return [
|
return [
|
||||||
BaseSignature(self._inference_state, s)
|
BaseSignature(self._inference_state, s)
|
||||||
for s in self._name.infer().get_signatures()
|
for s in self._get_signatures()
|
||||||
]
|
]
|
||||||
|
|
||||||
def execute(self):
|
def execute(self):
|
||||||
@@ -756,10 +756,3 @@ class ParamDefinition(Definition):
|
|||||||
'Python 2 is end-of-life, the new feature is not available for it'
|
'Python 2 is end-of-life, the new feature is not available for it'
|
||||||
)
|
)
|
||||||
return self._name.get_kind()
|
return self._name.get_kind()
|
||||||
|
|
||||||
|
|
||||||
def _format_signatures(value):
|
|
||||||
return '\n'.join(
|
|
||||||
signature.to_string()
|
|
||||||
for signature in value.get_signatures()
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -72,9 +72,6 @@ class AbstractNameDefinition(object):
|
|||||||
def is_import(self):
|
def is_import(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_signatures(self):
|
|
||||||
return []
|
|
||||||
|
|
||||||
def py__doc__(self):
|
def py__doc__(self):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
@@ -219,9 +216,6 @@ class ValueNameMixin(object):
|
|||||||
def py__doc__(self):
|
def py__doc__(self):
|
||||||
return self._value.py__doc__()
|
return self._value.py__doc__()
|
||||||
|
|
||||||
def get_signatures(self):
|
|
||||||
return self._value.get_signatures()
|
|
||||||
|
|
||||||
def _get_qualified_names(self):
|
def _get_qualified_names(self):
|
||||||
return self._value.get_qualified_names()
|
return self._value.get_qualified_names()
|
||||||
|
|
||||||
@@ -325,9 +319,6 @@ class TreeNameDefinition(AbstractTreeName):
|
|||||||
return find_statement_documentation(self.tree_name.get_definition())
|
return find_statement_documentation(self.tree_name.get_definition())
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def get_signatures(self):
|
|
||||||
return self.infer().get_signatures()
|
|
||||||
|
|
||||||
|
|
||||||
class _ParamMixin(object):
|
class _ParamMixin(object):
|
||||||
def maybe_positional_argument(self, include_star=True):
|
def maybe_positional_argument(self, include_star=True):
|
||||||
@@ -579,9 +570,6 @@ class ImportName(AbstractNameDefinition):
|
|||||||
def py__doc__(self):
|
def py__doc__(self):
|
||||||
return _merge_name_docs(self.goto())
|
return _merge_name_docs(self.goto())
|
||||||
|
|
||||||
def get_signatures(self):
|
|
||||||
return [sig for name in self.goto() for sig in name.get_signatures()]
|
|
||||||
|
|
||||||
|
|
||||||
class SubModuleName(ImportName):
|
class SubModuleName(ImportName):
|
||||||
_level = 1
|
_level = 1
|
||||||
@@ -616,13 +604,6 @@ class StubNameMixin(object):
|
|||||||
# from the implementation.
|
# from the implementation.
|
||||||
return _merge_name_docs(names)
|
return _merge_name_docs(names)
|
||||||
|
|
||||||
def get_signatures(self):
|
|
||||||
if self.tree_name is not None:
|
|
||||||
parent = self.tree_name.parent
|
|
||||||
if parent.type in ('funcdef', 'classdef') and parent.name is self.tree_name:
|
|
||||||
return self.infer().get_signatures()
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
# From here on down we make looking up the sys.version_info fast.
|
# From here on down we make looking up the sys.version_info fast.
|
||||||
class StubName(StubNameMixin, TreeNameDefinition):
|
class StubName(StubNameMixin, TreeNameDefinition):
|
||||||
|
|||||||
Reference in New Issue
Block a user