Debian Codegraph @

test/completion/on_import.py

raw symbols SCIP
1 def from_names():
2 #? ['mod1', 'base']
3 from import_tree.pkg.
4 #? ['path']
5 from os.
6
7 def from_names_goto():
8 from import_tree import pkg
9 #? pkg
10 from import_tree.pkg
11
12 def builtin_test():
13 #? ['math']
14 import math
15 #? ['mmap']
16 import mmap
17
18 # -----------------
19 # completions within imports
20 # -----------------
21
22 #? ['sqlite3']
23 import sqlite3
24
25 # classes is a local module that has an __init__.py and can therefore not be
26 # found.
27 #? []
28 import classes
29
30 #? ['timedelta']
31 from datetime import timedel
32 #? 21 []
33 from datetime.timedel import timedel
34
35 # should not be possible, because names can only be looked up 1 level deep.
36 #? []
37 from datetime.timedelta import resolution
38 #? []
39 from datetime.timedelta import
40
41 #? ['Cursor']
42 from sqlite3 import Cursor
43
44 #? ['some_variable']
45 from . import some_variable
46 #? ['arrays']
47 from . import arrays
48 #? []
49 from . import import_tree as ren
50 #? []
51 import json as
52
53 import os
54 #? os.path.join
55 from os.path import join
56
57 # -----------------
58 # special positions -> edge cases
59 # -----------------
60 import datetime
61
62 #? 6 datetime
63 from datetime.time import time
64
65 #? []
66 import datetime.
67 #? []
68 import datetime.date
69
70 #? 21 ['import']
71 from import_tree.pkg import pkg
72 #? 49 ['a', 'foobar', '__name__', '__doc__', '__file__', '__package__']
73 from import_tree.pkg.mod1 import not_existant, # whitespace before
74 #? ['a', 'foobar', '__name__', '__doc__', '__file__', '__package__']
75 from import_tree.pkg.mod1 import not_existant,
76 #? 22 ['mod1', 'base']
77 from import_tree.pkg. import mod1
78 #? 17 ['mod1', 'mod2', 'random', 'pkg', 'references', 'rename1', 'rename2', 'classes', 'globals', 'recurse_class1', 'recurse_class2', 'invisible_pkg', 'flow_import']
79 from import_tree. import new_pkg
80
81 #? 18 ['pkg']
82 from import_tree.p import pkg
83
84 #? 17 ['import_tree']
85 from .import_tree import
86 #? 10 ['run']
87 from ..run import
88 #? ['run']
89 from ..run
90 #? 10 ['run']
91 from ..run.
92 #? []
93 from ..run.
94
95 #? ['run']
96 from .. import run
97
98 #? []
99 from not_a_module import
100
101
102 #137
103 import json
104 #? 23 json.dump
105 from json import load, dump
106 #? 17 json.load
107 from json import load, dump
108 # without the from clause:
109 import json, datetime
110 #? 7 json
111 import json, datetime
112 #? 13 datetime
113 import json, datetime
114