From @kostub on September 13, 2017 22:10
Environment data
VS Code version: 1.16.0
Python Extension version: 0.7.0
Python Version: 2.7.12
OS and version: MacOS Sierra 10.12.6
Steps to reproduce:
- Create a directory with two packages
foo and test
- Inside
foo create a file bar.py
- Inside the
test directory create another package foo
- Inside
test/foo create a file gaz.py
So the directory structure is like:
foo
|--> __init__.py
|--> bar.py
test
|-->__init__.py
|--> foo
|--> __init__.py
|--> gaz.py
Open a new file in test/foo directory. Say test/foo/run.py
Add the following code:
from __future__ import absolute_import
Start typing import foo.
Actual behavior
The only autocomplete option shown is gaz
Expected behavior
Expected bar to be shown in the dropdown. Especially when absolute import is being used.
In fact import foo.gaz is probably incorrect since it is not a valid relative import either.
Logs
Output from Python output panel
None
Output from Console window (Help->Developer Tools menu)
None
Copied from original issue: DonJayamanne/pythonVSCode#1211
From @kostub on September 13, 2017 22:10
Environment data
VS Code version: 1.16.0
Python Extension version: 0.7.0
Python Version: 2.7.12
OS and version: MacOS Sierra 10.12.6
Steps to reproduce:
fooandtestfoocreate a filebar.pytestdirectory create another packagefootest/foocreate a filegaz.pySo the directory structure is like:
Open a new file in
test/foodirectory. Saytest/foo/run.pyAdd the following code:
Start typing
import foo.Actual behavior
The only autocomplete option shown is
gazExpected behavior
Expected
barto be shown in the dropdown. Especially when absolute import is being used.In fact
import foo.gazis probably incorrect since it is not a valid relative import either.Logs
Output from
Pythonoutput panelNone
Output from
Console window(Help->Developer Tools menu)None
Copied from original issue: DonJayamanne/pythonVSCode#1211