mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-16 21:44:56 +08:00
Fix some more context issues
This commit is contained in:
@@ -120,6 +120,10 @@ class HelperValueMixin(object):
|
||||
return class2.is_same_class(self)
|
||||
return self == class2
|
||||
|
||||
@memoize_method
|
||||
def as_context(self):
|
||||
return self._as_context()
|
||||
|
||||
|
||||
class Value(HelperValueMixin, BaseValue):
|
||||
"""
|
||||
@@ -222,10 +226,6 @@ class Value(HelperValueMixin, BaseValue):
|
||||
# The root value knows if it's a stub or not.
|
||||
return self.parent_context.is_stub()
|
||||
|
||||
@memoize_method
|
||||
def as_context(self):
|
||||
return self._as_context()
|
||||
|
||||
def _as_context(self):
|
||||
raise NotImplementedError('Not all values need to be converted to contexts')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user