mirror of
https://github.com/davidhalter/jedi.git
synced 2026-08-18 04:57:58 +08:00
make a slow inspect.getdoc() call lazy, which improves performance for numpy completions by 30%
This commit is contained in:
@@ -24,7 +24,10 @@ class CompiledObject(Base):
|
|||||||
def __init__(self, obj, parent=None):
|
def __init__(self, obj, parent=None):
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.doc = inspect.getdoc(obj) or ''
|
|
||||||
|
@property
|
||||||
|
def doc(self):
|
||||||
|
return inspect.getdoc(self.obj) or ''
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def params(self):
|
def params(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user