1
0
forked from VimPlug/jedi

The check if we should add type completions is now a bit more obvious

This commit is contained in:
Dave Halter
2017-11-24 08:55:16 +01:00
parent 1a7fc512bc
commit 52bc1be84e

View File

@@ -388,9 +388,8 @@ class CompiledObjectFilter(AbstractFilter):
for name in dir(obj):
names += self.get(name)
is_instance = self._is_instance or fake.is_class_instance(obj)
# ``dir`` doesn't include the type names.
if not inspect.ismodule(obj) and (obj is not type) and not is_instance:
if not self._is_instance and inspect.isclass(obj) and obj != type:
for filter in create(self._evaluator, type).get_filters():
names += filter.values()
return names