From b4494e588f06314aa2a9454538a31a3f354c5bc3 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 11 Feb 2020 18:34:41 +0100 Subject: [PATCH] A prefixed path should not also be suffixed --- jedi/api/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/api/project.py b/jedi/api/project.py index 45e4c09a..d39c88b3 100644 --- a/jedi/api/project.py +++ b/jedi/api/project.py @@ -124,7 +124,7 @@ class Project(object): # 2. Stopping immediately when above self._path traversed = [] for parent_path in traverse_parents(inference_state.script_path): - if not parent_path.startswith(self._path): + if parent_path == self._path or not parent_path.startswith(self._path): break if not add_init_paths \ and os.path.isfile(os.path.join(parent_path, "__init__.py")):