forked from VimPlug/jedi
pass the first test
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
"""
|
||||
Imitate the parser representation.
|
||||
"""
|
||||
from jedi.cache import underscore_memoization
|
||||
|
||||
|
||||
@@ -10,6 +13,9 @@ class PyObject(object):
|
||||
for name in dir(self.obj):
|
||||
yield PyName(self, name)
|
||||
|
||||
def isinstance(self, *obj):
|
||||
return isinstance(self, obj)
|
||||
|
||||
|
||||
class PyName(object):
|
||||
def __init__(self, obj, name):
|
||||
@@ -22,3 +28,6 @@ class PyName(object):
|
||||
@underscore_memoization
|
||||
def parent(self):
|
||||
return PyObject(getattr(self._obj.obj, self._name), self._obj)
|
||||
|
||||
def get_code(self):
|
||||
return self._name
|
||||
|
||||
Reference in New Issue
Block a user