Use types instead of special objects (see also #988)

This commit is contained in:
Dave Halter
2017-11-12 13:12:04 +01:00
parent 969d029499
commit 3a4dc94ee6
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -576,9 +576,9 @@ def _a_generator(foo):
_SPECIAL_OBJECTS = { _SPECIAL_OBJECTS = {
'FUNCTION_CLASS': type(load_module), 'FUNCTION_CLASS': types.FunctionType,
'METHOD_CLASS': type(CompiledObject.is_class), 'METHOD_CLASS': type(CompiledObject.is_class),
'MODULE_CLASS': type(os), 'MODULE_CLASS': types.ModuleType,
'GENERATOR_OBJECT': _a_generator(1.0), 'GENERATOR_OBJECT': _a_generator(1.0),
'BUILTINS': _builtins, 'BUILTINS': _builtins,
} }
@@ -41,7 +41,7 @@ class CompiledSubProcess(object):
(executable, '-m', 'jedi.evaluate.compiled.subprocess') (executable, '-m', 'jedi.evaluate.compiled.subprocess')
) )
def command(self): def command(self, command):
return self._send() return self._send()