mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-24 22:34:22 +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):
|
||||
return obj.execute()
|
||||
if obj.isinstance(compiled.CompiledObject):
|
||||
elif obj.isinstance(compiled.CompiledObject):
|
||||
if obj.is_executable_class():
|
||||
return [er.Instance(self, obj, params)]
|
||||
else:
|
||||
|
||||
@@ -87,6 +87,7 @@ class CompiledObject(Base):
|
||||
def execute_function(self, evaluator, params):
|
||||
if self.type() != 'def':
|
||||
return
|
||||
|
||||
for name in self._parse_function_doc()[1].split():
|
||||
try:
|
||||
bltn_obj = _create_from_name(builtin, builtin, name)
|
||||
@@ -94,7 +95,9 @@ class CompiledObject(Base):
|
||||
continue
|
||||
else:
|
||||
if isinstance(bltn_obj, CompiledObject):
|
||||
yield bltn_obj
|
||||
# We want everything except None.
|
||||
if bltn_obj.obj is not None:
|
||||
yield bltn_obj
|
||||
else:
|
||||
for result in evaluator.execute(bltn_obj, params):
|
||||
yield result
|
||||
|
||||
Reference in New Issue
Block a user