forked from VimPlug/jedi
Cache the default project
This commit is contained in:
@@ -89,7 +89,19 @@ def _is_potential_project(path):
|
||||
return False
|
||||
|
||||
|
||||
_cached_default_project = None
|
||||
|
||||
|
||||
def get_default_project():
|
||||
global _cached_default_project
|
||||
if _cached_default_project is None:
|
||||
# We are caching it here, because checking for it every time is just
|
||||
# too much work.
|
||||
_cached_default_project = _get_default_project()
|
||||
return _cached_default_project
|
||||
|
||||
|
||||
def _get_default_project():
|
||||
previous = None
|
||||
curdir = dir = os.path.realpath(os.curdir())
|
||||
probable_path = None
|
||||
|
||||
Reference in New Issue
Block a user