mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Fix an issue with names
This commit is contained in:
@@ -232,7 +232,8 @@ class ValueNameMixin(object):
|
||||
if not doc and self._value.is_stub():
|
||||
from jedi.inference.gradual.conversion import convert_names
|
||||
names = convert_names([self], prefer_stub_to_compiled=False)
|
||||
return _merge_name_docs(names)
|
||||
if self not in names:
|
||||
return _merge_name_docs(names)
|
||||
return doc
|
||||
|
||||
def _get_qualified_names(self):
|
||||
|
||||
@@ -429,3 +429,10 @@ def test_completion_cache(Script, module_injector):
|
||||
cls, = c.infer()
|
||||
assert cls.type == 'class'
|
||||
assert cls.docstring() == 'foo()\n\ndoc2'
|
||||
|
||||
|
||||
def test_typing_module_completions(Script):
|
||||
for c in Script('import typing; typing.').completions():
|
||||
# Just make sure that there are no errors
|
||||
c.type
|
||||
c.docstring()
|
||||
|
||||
Reference in New Issue
Block a user