diff --git a/jedi/evaluate/compiled/fake.py b/jedi/evaluate/compiled/fake.py index 37c2cff4..a5be29a0 100644 --- a/jedi/evaluate/compiled/fake.py +++ b/jedi/evaluate/compiled/fake.py @@ -22,21 +22,25 @@ MethodDescriptorType = type(str.replace) NOT_CLASS_TYPES = ( types.BuiltinFunctionType, types.CodeType, - types.DynamicClassAttribute, types.FrameType, types.FunctionType, types.GeneratorType, types.GetSetDescriptorType, types.LambdaType, - types.MappingProxyType, types.MemberDescriptorType, types.MethodType, types.ModuleType, - types.SimpleNamespace, types.TracebackType, MethodDescriptorType ) +if is_py3: + NOT_CLASS_TYPES += ( + types.DynamicClassAttribute, + types.MappingProxyType, + types.SimpleNamespace + ) + def _load_faked_module(module): module_name = module.__name__