mirror of
https://github.com/davidhalter/jedi.git
synced 2026-03-06 20:25:26 +08:00
Fix descriptions for REPL.
This commit is contained in:
@@ -116,7 +116,7 @@ class LazyName(helpers.FakeName):
|
|||||||
evaluated = compiled.create(self._evaluator, obj)
|
evaluated = compiled.create(self._evaluator, obj)
|
||||||
found = [evaluated]
|
found = [evaluated]
|
||||||
|
|
||||||
if len(found) > 1 or True:
|
if len(found) > 1:
|
||||||
content = iterable.AlreadyEvaluated(found)
|
content = iterable.AlreadyEvaluated(found)
|
||||||
stmt = pt.ExprStmt([self, pt.Operator(pt.zero_position_modifier,
|
stmt = pt.ExprStmt([self, pt.Operator(pt.zero_position_modifier,
|
||||||
'=', (0, 0), ''), content])
|
'=', (0, 0), ''), content])
|
||||||
|
|||||||
@@ -153,6 +153,13 @@ class NameFinder(object):
|
|||||||
last_names.append(name)
|
last_names.append(name)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if isinstance(stmt, er.ModuleWrapper):
|
||||||
|
# In case of REPL completion, we can infer modules names that
|
||||||
|
# don't really have a definition (because they are really just
|
||||||
|
# namespaces). In this case we can just add it.
|
||||||
|
last_names.append(name)
|
||||||
|
continue
|
||||||
|
|
||||||
if isinstance(name, compiled.CompiledName) \
|
if isinstance(name, compiled.CompiledName) \
|
||||||
or isinstance(name, er.InstanceName) and isinstance(name._origin_name, compiled.CompiledName):
|
or isinstance(name, er.InstanceName) and isinstance(name._origin_name, compiled.CompiledName):
|
||||||
last_names.append(name)
|
last_names.append(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user