mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-20 10:38:27 +08:00
fixed None type appearances in CompiledObject
This commit is contained in:
@@ -305,7 +305,7 @@ class Evaluator(object):
|
|||||||
|
|
||||||
if isinstance(obj, iterable.GeneratorMethod):
|
if isinstance(obj, iterable.GeneratorMethod):
|
||||||
return obj.execute()
|
return obj.execute()
|
||||||
if obj.isinstance(compiled.CompiledObject):
|
elif obj.isinstance(compiled.CompiledObject):
|
||||||
if obj.is_executable_class():
|
if obj.is_executable_class():
|
||||||
return [er.Instance(self, obj, params)]
|
return [er.Instance(self, obj, params)]
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class CompiledObject(Base):
|
|||||||
def execute_function(self, evaluator, params):
|
def execute_function(self, evaluator, params):
|
||||||
if self.type() != 'def':
|
if self.type() != 'def':
|
||||||
return
|
return
|
||||||
|
|
||||||
for name in self._parse_function_doc()[1].split():
|
for name in self._parse_function_doc()[1].split():
|
||||||
try:
|
try:
|
||||||
bltn_obj = _create_from_name(builtin, builtin, name)
|
bltn_obj = _create_from_name(builtin, builtin, name)
|
||||||
@@ -94,7 +95,9 @@ class CompiledObject(Base):
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if isinstance(bltn_obj, CompiledObject):
|
if isinstance(bltn_obj, CompiledObject):
|
||||||
yield bltn_obj
|
# We want everything except None.
|
||||||
|
if bltn_obj.obj is not None:
|
||||||
|
yield bltn_obj
|
||||||
else:
|
else:
|
||||||
for result in evaluator.execute(bltn_obj, params):
|
for result in evaluator.execute(bltn_obj, params):
|
||||||
yield result
|
yield result
|
||||||
|
|||||||
Reference in New Issue
Block a user