mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 07:41:51 +08:00
Fix a small oversight about type
This commit is contained in:
@@ -224,15 +224,16 @@ class ClassMixin(object):
|
|||||||
yield filter
|
yield filter
|
||||||
else:
|
else:
|
||||||
yield self._create_class_filter(cls, origin_scope, is_instance)
|
yield self._create_class_filter(cls, origin_scope, is_instance)
|
||||||
if not is_instance and self:
|
if not is_instance:
|
||||||
# Return completions of the meta class.
|
|
||||||
from jedi.evaluate.compiled import builtin_from_name
|
from jedi.evaluate.compiled import builtin_from_name
|
||||||
type_ = builtin_from_name(self.evaluator, u'type')
|
type_ = builtin_from_name(self.evaluator, u'type')
|
||||||
yield ClassFilter(
|
if type_ != self:
|
||||||
self.evaluator, self, node_context=type_,
|
# Return completions of the meta class.
|
||||||
origin_scope=origin_scope,
|
yield ClassFilter(
|
||||||
is_instance=is_instance
|
self.evaluator, self, node_context=type_,
|
||||||
)
|
origin_scope=origin_scope,
|
||||||
|
is_instance=is_instance
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ClassContext(use_metaclass(CachedMetaClass, ClassMixin, TreeContext)):
|
class ClassContext(use_metaclass(CachedMetaClass, ClassMixin, TreeContext)):
|
||||||
|
|||||||
Reference in New Issue
Block a user