mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-26 13:46:43 +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):
|
||||
self.obj = obj
|
||||
self.parent = parent
|
||||
self.doc = inspect.getdoc(obj) or ''
|
||||
|
||||
@property
|
||||
def doc(self):
|
||||
return inspect.getdoc(self.obj) or ''
|
||||
|
||||
@property
|
||||
def params(self):
|
||||
|
||||
Reference in New Issue
Block a user