Fix a small oversight about type

This commit is contained in:
Dave Halter
2018-10-23 23:31:55 +02:00
parent a45d86c2a4
commit e12f9d5a1c

View File

@@ -224,10 +224,11 @@ class ClassMixin(object):
yield filter
else:
yield self._create_class_filter(cls, origin_scope, is_instance)
if not is_instance and self:
# Return completions of the meta class.
if not is_instance:
from jedi.evaluate.compiled import builtin_from_name
type_ = builtin_from_name(self.evaluator, u'type')
if type_ != self:
# Return completions of the meta class.
yield ClassFilter(
self.evaluator, self, node_context=type_,
origin_scope=origin_scope,