mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
PY-36374 When suggesting imports, don't shadow package aliases with namesake definitions
Previously, we suggested variants for these well-known aliases only if no other symbols were found. In particular, having "np" name defined in the sources of pandas prevented "import numpy as np" from being offered. ImportCandidateHolder had to be refactored a bit to keep the name of the corresponding symbol itself, because it used to be taken from the parent AutoImportQuickFix, which now only holds the name of the reference, and, thus, "numpy" ended up being imported as "import np as np". Also, such imports are now suggested higher in the list than the rest. GitOrigin-RevId: 75bed654431e81e6df40f1400ee4b02a4ab0dcca
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dd3bf6e195
commit
3ba2747c51
@@ -0,0 +1 @@
|
||||
<error descr="Unresolved reference 'np'">n<caret>p</error>.ndarray
|
||||
@@ -0,0 +1,3 @@
|
||||
import numpy as np
|
||||
|
||||
np.ndarray
|
||||
Reference in New Issue
Block a user