mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-31 03:15:22 +08:00
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 = (
|
||||
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__
|
||||
|
||||
Reference in New Issue
Block a user