Fix type completions on classes
This commit is contained in:
1 parent
6abd96a398
commit
bd3bd2e53b
4 files changed
+24
-4
No files matched your search
@@ -203,6 +203,15 @@ class ClassContext(use_metaclass(CachedMetaClass, TreeContext)):
|
||||
origin_scope=origin_scope,
|
||||
is_instance=is_instance
|
||||
)
|
||||
if not is_instance and self:
|
||||
# Return completions of the meta class.
|
||||
from jedi.evaluate.compiled import builtin_from_name
|
||||
type_ = builtin_from_name(self.evaluator, u'type')
|
||||
yield ClassFilter(
|
||||
self.evaluator, self, node_context=type_,
|
||||
origin_scope=origin_scope,
|
||||
is_instance=is_instance
|
||||
)
|
||||
|
||||
def is_class(self):
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user