1
0
forked from VimPlug/jedi

Remove FUNCTION_CLASS, in favor of a typeshed solution

This commit is contained in:
Dave Halter
2019-05-19 14:19:30 +02:00
parent 05a3d7a3bc
commit f9eedfbf64
3 changed files with 7 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ from jedi.evaluate.lazy_context import LazyKnownContexts, LazyKnownContext, \
from jedi.evaluate.context import iterable
from jedi import parser_utils
from jedi.evaluate.parser_cache import get_yield_exprs
from jedi.evaluate.helpers import contexts_from_qualified_names
class LambdaName(AbstractNameDefinition):
@@ -139,7 +140,8 @@ class FunctionContext(use_metaclass(CachedMetaClass, FunctionMixin, TreeContext)
return function
def py__class__(self):
return compiled.get_special_object(self.evaluator, u'FUNCTION_CLASS')
c, = contexts_from_qualified_names(self.evaluator, 'types', 'FunctionType')
return c
def get_default_param_context(self):
return self.parent_context