Files
openide/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/ntpath.py
T
Mikhail Golubev 1c3b81b322 PY-19773 Remember already suggested importable elements using their canonical names
The problem was caused by the fact that we ignore imported element
"request" in "flask/__init__.py" at first and mark this module as
already checked (using the name "flask") and then refuse to suggest
"flask.globals.requests" because its canonical qualified name is
"flask.request".

I've also added a test on importing functions of os.path module since
it's a well-known case where several different symbols should be imported
using the same name (provided by PyStdlibCanonicalPathProvider).
My first attempt to fix the problem by saving actual import candidates
instead of their canonical qualified names has broken exactly this
scenario.
2016-06-30 08:50:59 +03:00

2 lines
25 B
Python