PY-46356 Suggest qualified import names for common aliases

I moved the custom index lookup, previously used in PyImportCollector to find
modules and packages, to PyModuleNameIndex, already utilized in other similar,
places such as PyModulePackageCompletionContributor. Two new methods where
introduced to the interface of PyModuleNameIndex for that. The first one
is a generalization of  find(), allowing to re-use an existing search scope, and
the second finds modules by their fully qualified name in the same fashion as
it was done in PyClassNameIndex.findClass().

GitOrigin-RevId: 2de5821351eacf08ddc045454eea189b21fa1186
This commit is contained in:
Mikhail Golubev
2021-01-07 12:17:33 +03:00
committed by intellij-monorepo-bot
parent 8e53b39d77
commit 6f5997ee45
12 changed files with 89 additions and 34 deletions