1
0
forked from VimPlug/jedi

Cache the default project

This commit is contained in:
Dave Halter
2018-01-16 00:20:33 +01:00
parent 2a0e8f91d3
commit c6240d5453

View File

@@ -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