mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 06:19:39 +08:00
The check if we should add type completions is now a bit more obvious
This commit is contained in:
@@ -388,9 +388,8 @@ class CompiledObjectFilter(AbstractFilter):
|
|||||||
for name in dir(obj):
|
for name in dir(obj):
|
||||||
names += self.get(name)
|
names += self.get(name)
|
||||||
|
|
||||||
is_instance = self._is_instance or fake.is_class_instance(obj)
|
|
||||||
# ``dir`` doesn't include the type names.
|
# ``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():
|
for filter in create(self._evaluator, type).get_filters():
|
||||||
names += filter.values()
|
names += filter.values()
|
||||||
return names
|
return names
|
||||||
|
|||||||
Reference in New Issue
Block a user