forked from VimPlug/jedi
Merge branch 'master' into refactor
This commit is contained in:
@@ -484,6 +484,11 @@ class DirectObjectAccess(object):
|
||||
def needs_type_completions(self):
|
||||
return inspect.isclass(self._obj) and self._obj != type
|
||||
|
||||
def _annotation_to_str(self, annotation):
|
||||
if isinstance(annotation, type):
|
||||
return str(annotation.__name__)
|
||||
return str(annotation)
|
||||
|
||||
def get_signature_params(self):
|
||||
return [
|
||||
SignatureParam(
|
||||
@@ -493,7 +498,7 @@ class DirectObjectAccess(object):
|
||||
default_string=repr(p.default),
|
||||
has_annotation=p.annotation is not p.empty,
|
||||
annotation=self._create_access_path(p.annotation),
|
||||
annotation_string=str(p.annotation),
|
||||
annotation_string=self._annotation_to_str(p.annotation),
|
||||
kind_name=str(p.kind)
|
||||
) for p in self._get_signature().parameters.values()
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user