forked from VimPlug/jedi
Move some of the compiled.create calls to compiled.builtin_from_name
This commit is contained in:
@@ -223,7 +223,8 @@ def builtins_isinstance(evaluator, objects, types, arguments):
|
||||
# This is temporary. Everything should have a class attribute in
|
||||
# Python?! Maybe we'll leave it here, because some numpy objects or
|
||||
# whatever might not.
|
||||
return ContextSet(compiled.create(evaluator, True), compiled.create(evaluator, False))
|
||||
bool_results = set([True, False])
|
||||
break
|
||||
|
||||
mro = mro_func()
|
||||
|
||||
@@ -247,7 +248,10 @@ def builtins_isinstance(evaluator, objects, types, arguments):
|
||||
'not %s.' % cls_or_tup
|
||||
analysis.add(lazy_context._context, 'type-error-isinstance', node, message)
|
||||
|
||||
return ContextSet.from_iterable(compiled.create(evaluator, x) for x in bool_results)
|
||||
return ContextSet.from_iterable(
|
||||
compiled.builtin_from_name(evaluator, str(b))
|
||||
for b in bool_results
|
||||
)
|
||||
|
||||
|
||||
def collections_namedtuple(evaluator, obj, arguments):
|
||||
|
||||
Reference in New Issue
Block a user