mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
A prefixed path should not also be suffixed
This commit is contained in:
@@ -124,7 +124,7 @@ class Project(object):
|
|||||||
# 2. Stopping immediately when above self._path
|
# 2. Stopping immediately when above self._path
|
||||||
traversed = []
|
traversed = []
|
||||||
for parent_path in traverse_parents(inference_state.script_path):
|
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
|
break
|
||||||
if not add_init_paths \
|
if not add_init_paths \
|
||||||
and os.path.isfile(os.path.join(parent_path, "__init__.py")):
|
and os.path.isfile(os.path.join(parent_path, "__init__.py")):
|
||||||
|
|||||||
Reference in New Issue
Block a user