1
0
forked from VimPlug/jedi

Make it possible to import Jedi in Python 2 again.

This commit is contained in:
Dave Halter
2016-05-28 20:20:45 +02:00
parent 4714b464a6
commit 2700c2cca4

View File

@@ -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__