From a01c9daa5c9575e080287e506a1fb1c295c1a17a Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Tue, 22 Oct 2024 23:44:31 -0400 Subject: [PATCH] Update previously missed submodule_path references --- astroid/interpreter/_import/spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py index 1b11a7fbda..e0c54d4a8a 100644 --- a/astroid/interpreter/_import/spec.py +++ b/astroid/interpreter/_import/spec.py @@ -472,13 +472,13 @@ def _find_spec( if modpath: if isinstance(finder, Finder): search_paths = finder.contribute_to_path(spec, processed) - # If modname is a package from an editable install, update submodule_path + # If modname is a package from an editable install, update search_paths # so that the next module in the path will be found inside of it using importlib. # Existence of __name__ is guaranteed by _find_spec_with_path. elif finder.__name__ in _EditableFinderClasses: # type: ignore[attr-defined] search_paths = spec.submodule_search_locations if spec.type == ModuleType.PKG_DIRECTORY: - spec = spec._replace(submodule_search_locations=submodule_path) + spec = spec._replace(submodule_search_locations=search_paths) return spec