1
0
forked from VimPlug/jedi

Relative imports with more than one level did not work

Fixes #784.
This commit is contained in:
Dave Halter
2017-09-14 22:05:04 +02:00
parent ab84030ad2
commit e389c61377
5 changed files with 26 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ def scope_nested():
#? float()
import_tree.pkg.mod1.a
#? ['a', '__name__', '__package__', '__file__', '__doc__']
#? ['a', 'foobar', '__name__', '__package__', '__file__', '__doc__']
a = import_tree.pkg.mod1.
import import_tree.random
@@ -283,3 +283,13 @@ def underscore():
# Does that also work for the our own module?
#? ['__file__']
__file__
# -----------------
# complex relative imports #784
# -----------------
def relative():
#? ['foobar']
from import_tree.pkg.mod1 import foobar
#? int()
foobar