forked from VimPlug/jedi
clean up parse_dot_name and other small things
This commit is contained in:
@@ -23,6 +23,11 @@ class CompiledObject(Base):
|
||||
asserts = []
|
||||
path = None # modules have this attribute - set it to None.
|
||||
|
||||
def __init__(self, obj, parent=None):
|
||||
self.obj = obj
|
||||
self.parent = parent
|
||||
self.doc = inspect.getdoc(obj)
|
||||
|
||||
@property
|
||||
def params(self):
|
||||
params_str, ret = self._parse_function_doc()
|
||||
@@ -37,18 +42,9 @@ class CompiledObject(Base):
|
||||
end_pos))
|
||||
return params
|
||||
|
||||
def __init__(self, obj, parent=None):
|
||||
self.obj = obj
|
||||
self.parent = parent
|
||||
self.doc = inspect.getdoc(obj)
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s: %s>' % (type(self).__name__, repr(self.obj))
|
||||
|
||||
def get_parent_until(self, *args, **kwargs):
|
||||
# compiled modules only use functions and classes/methods (2 levels)
|
||||
return getattr(self.parent, 'parent', self.parent) or self.parent or self
|
||||
|
||||
@underscore_memoization
|
||||
def _parse_function_doc(self):
|
||||
if self.doc is None:
|
||||
|
||||
Reference in New Issue
Block a user