mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-11 09:08:43 +08:00
Cache Script._get_module
This commit is contained in:
@@ -143,6 +143,9 @@ class Script(object):
|
|||||||
cache.clear_time_caches()
|
cache.clear_time_caches()
|
||||||
debug.reset_time()
|
debug.reset_time()
|
||||||
|
|
||||||
|
# Cache the module, this is mostly useful for testing, since this shouldn't
|
||||||
|
# be called multiple times.
|
||||||
|
@cache.memoize_method
|
||||||
def _get_module(self):
|
def _get_module(self):
|
||||||
names = ('__main__',)
|
names = ('__main__',)
|
||||||
if self.path is not None:
|
if self.path is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user