forked from VimPlug/jedi
Make it possible to import Jedi in Python 2 again.
This commit is contained in:
@@ -22,21 +22,25 @@ MethodDescriptorType = type(str.replace)
|
|||||||
NOT_CLASS_TYPES = (
|
NOT_CLASS_TYPES = (
|
||||||
types.BuiltinFunctionType,
|
types.BuiltinFunctionType,
|
||||||
types.CodeType,
|
types.CodeType,
|
||||||
types.DynamicClassAttribute,
|
|
||||||
types.FrameType,
|
types.FrameType,
|
||||||
types.FunctionType,
|
types.FunctionType,
|
||||||
types.GeneratorType,
|
types.GeneratorType,
|
||||||
types.GetSetDescriptorType,
|
types.GetSetDescriptorType,
|
||||||
types.LambdaType,
|
types.LambdaType,
|
||||||
types.MappingProxyType,
|
|
||||||
types.MemberDescriptorType,
|
types.MemberDescriptorType,
|
||||||
types.MethodType,
|
types.MethodType,
|
||||||
types.ModuleType,
|
types.ModuleType,
|
||||||
types.SimpleNamespace,
|
|
||||||
types.TracebackType,
|
types.TracebackType,
|
||||||
MethodDescriptorType
|
MethodDescriptorType
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if is_py3:
|
||||||
|
NOT_CLASS_TYPES += (
|
||||||
|
types.DynamicClassAttribute,
|
||||||
|
types.MappingProxyType,
|
||||||
|
types.SimpleNamespace
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _load_faked_module(module):
|
def _load_faked_module(module):
|
||||||
module_name = module.__name__
|
module_name = module.__name__
|
||||||
|
|||||||
Reference in New Issue
Block a user