forked from VimPlug/jedi
merge issue-213-from-import-definition of @tkf into dev
This commit is contained in:
1
test/completion/import_tree/mod2.py
Normal file
1
test/completion/import_tree/mod2.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import mod1 as fake
|
||||||
@@ -71,6 +71,27 @@ def builtin_test():
|
|||||||
#? ['math']
|
#? ['math']
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
def scope_from_import_variable():
|
||||||
|
#? int()
|
||||||
|
from import_tree.mod2.fake import a
|
||||||
|
#? set
|
||||||
|
from import_tree.mod2.fake import c
|
||||||
|
|
||||||
|
#? int()
|
||||||
|
a
|
||||||
|
#? set
|
||||||
|
c
|
||||||
|
|
||||||
|
def scope_from_import_variable_with_parenthesis():
|
||||||
|
from import_tree.mod2.fake import (
|
||||||
|
a, c
|
||||||
|
)
|
||||||
|
|
||||||
|
#? int()
|
||||||
|
a
|
||||||
|
#? set
|
||||||
|
c
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# std lib modules
|
# std lib modules
|
||||||
# -----------------
|
# -----------------
|
||||||
@@ -87,6 +108,16 @@ import os
|
|||||||
#? ['dirname']
|
#? ['dirname']
|
||||||
os.path.dirname
|
os.path.dirname
|
||||||
|
|
||||||
|
#? os.path.join
|
||||||
|
from os.path import join
|
||||||
|
|
||||||
|
from os.path import (
|
||||||
|
expanduser
|
||||||
|
)
|
||||||
|
|
||||||
|
#? os.path.expanduser
|
||||||
|
expanduser
|
||||||
|
|
||||||
from itertools import (tee,
|
from itertools import (tee,
|
||||||
islice)
|
islice)
|
||||||
#? ['islice']
|
#? ['islice']
|
||||||
@@ -213,7 +244,7 @@ import datetime.date
|
|||||||
|
|
||||||
#? 18 ['import']
|
#? 18 ['import']
|
||||||
from import_tree. import pkg
|
from import_tree. import pkg
|
||||||
#? 17 ['mod1', 'random', 'pkg', 'rename1', 'rename2', 'recurse_class1', 'recurse_class2']
|
#? 17 ['mod1', 'mod2', 'random', 'pkg', 'rename1', 'rename2', 'recurse_class1', 'recurse_class2']
|
||||||
from import_tree. import pkg
|
from import_tree. import pkg
|
||||||
|
|
||||||
#? 18 ['pkg']
|
#? 18 ['pkg']
|
||||||
|
|||||||
Reference in New Issue
Block a user