File tree Expand file tree Collapse file tree 1 file changed +184
-18
lines changed Expand file tree Collapse file tree 1 file changed +184
-18
lines changed Original file line number Diff line number Diff line change @@ -3,37 +3,202 @@ M = {}
3
3
-- If nothing is found, it will return `import ..` anyway.
4
4
-- However, it might take some time to search the candidate,
5
5
-- so we define a list of common imports here.
6
+ -- Updated for Python 3.13
6
7
--- @type string[]
7
8
M .default_import = {
8
- " pickle" ,
9
- " os" ,
10
- " sys" ,
11
- " re" ,
12
- " json" ,
13
- " time" ,
14
- " datetime" ,
15
- " random" ,
16
- " math" ,
17
- " importlib" ,
9
+ -- built-in
10
+ " abc" ,
18
11
" argparse" ,
19
- " shutil" ,
12
+ " array" ,
13
+ " ast" ,
14
+ " asyncio" ,
15
+ " atexit" ,
16
+ " base64" ,
17
+ " bdb" ,
18
+ " binascii" ,
19
+ " bisect" ,
20
+ " builtins" ,
21
+ " bz2" ,
22
+
23
+ " calendar" ,
24
+ " cmath" ,
25
+ " cmd" ,
26
+ " code" ,
27
+ " codecs" ,
28
+ " codeop" ,
29
+ " collections" ,
30
+ " colorsys" ,
31
+ " compileall" ,
32
+ " concurrent" ,
33
+ " configparser" ,
34
+ " contextlib" ,
35
+ " contextvars" ,
20
36
" copy" ,
37
+ " copyreg" ,
38
+ " cProfile" ,
39
+ " csv" ,
40
+ " ctypes" ,
41
+ " curses" ,
21
42
" dataclasses" ,
43
+ " datetime" ,
44
+ " dbm" ,
45
+ " decimal" ,
46
+ " difflib" ,
47
+ " dis" ,
48
+ " doctest" ,
49
+
50
+ " email" ,
51
+ " encodings" ,
52
+ " ensurepip" ,
22
53
" enum" ,
54
+ " errno" ,
55
+
56
+ " faulthandler" ,
57
+ " fcntl" ,
58
+ " filecmp" ,
59
+ " fileinput" ,
60
+ " fnmatch" ,
61
+ " fractions" ,
62
+ " ftplib" ,
23
63
" functools" ,
64
+
65
+ " gc" ,
66
+ " getopt" ,
67
+ " getpass" ,
68
+ " gettext" ,
24
69
" glob" ,
25
- " itertools" ,
26
- " pathlib" ,
27
- " abc" ,
28
- " contextlib" ,
29
- " collections" ,
70
+ " graphlib" ,
71
+ " grp" ,
72
+ " gzip" ,
73
+ " hashlib" ,
74
+ " heapq" ,
75
+ " hmac" ,
76
+ " html" ,
77
+ " http" ,
78
+ " idlelib" ,
79
+ " imaplib" ,
80
+ " importlib" ,
81
+ " inspect" ,
30
82
" io" ,
83
+ " ipaddress" ,
84
+ " itertools" ,
85
+ " json" ,
86
+ " keyword" ,
87
+ " linecache" ,
88
+ " locale" ,
89
+ " logging" ,
90
+ " lzma" ,
91
+ " mailbox" ,
92
+ " marshal" ,
93
+ " math" ,
94
+ " mimetypes" ,
95
+ " mmap" ,
96
+ " modulefinder" ,
97
+ " msvcrt" ,
31
98
" multiprocessing" ,
99
+ " netrc" ,
100
+ " numbers" ,
101
+ " operator" ,
102
+ " optparse" ,
103
+ " os" ,
104
+ " pathlib" ,
105
+ " pdb" ,
106
+ " pickle" ,
107
+ " pickletools" ,
108
+ " pkgutil" ,
109
+ " platform" ,
110
+ " plistlib" ,
111
+ " poplib" ,
112
+ " posix" ,
113
+ " pprint" ,
114
+ " profile" ,
115
+ " pstats" ,
116
+ " pty" ,
117
+ " pwd" ,
118
+ " py_compile" ,
119
+ " pyclbr" ,
120
+ " pydoc" ,
121
+
122
+ " queue" ,
123
+ " quopri" ,
124
+ " random" ,
125
+ " re" ,
126
+ " readline" ,
127
+ " reprlib" ,
128
+ " resource" ,
129
+ " rlcompleter" ,
130
+ " runpy" ,
131
+ " sched" ,
132
+ " secrets" ,
133
+ " select" ,
134
+ " selectors" ,
135
+ " shelve" ,
136
+ " shlex" ,
137
+ " shutil" ,
138
+ " signal" ,
139
+ " site" ,
140
+ " sitecustomize" ,
141
+ " smtplib" ,
142
+ " socket" ,
143
+ " socketserver" ,
144
+ " sqlite3" ,
145
+ " ssl" ,
146
+ " stat" ,
147
+ " statistics" ,
148
+ " string" ,
149
+ " stringprep" ,
150
+ " struct" ,
151
+ " subprocess" ,
152
+ " symtable" ,
153
+ " sys" ,
154
+ " sysconfig" ,
155
+ " syslog" ,
156
+
157
+ " tabnanny" ,
158
+ " tarfile" ,
159
+ " tempfile" ,
160
+ " termios" ,
161
+ " test" ,
162
+ " textwrap" ,
163
+ " threading" ,
164
+ " time" ,
165
+ " timeit" ,
166
+ " tkinter" ,
167
+ " token" ,
168
+ " tokenize" ,
169
+ " tomllib" ,
170
+ " trace" ,
171
+ " traceback" ,
172
+ " tracemalloc" ,
173
+ " tty" ,
174
+ " turtle" ,
175
+ " turtledemo" ,
176
+ " types" ,
32
177
" typing" ,
178
+ " unicodedata" ,
179
+ " unittest" ,
180
+ " urllib" ,
181
+ " usercustomize" ,
182
+ " uuid" ,
183
+ " venv" ,
184
+ " warnings" ,
185
+ " wave" ,
186
+ " weakref" ,
187
+ " webbrowser" ,
188
+ " winreg" ,
189
+ " winsound" ,
190
+ " wsgiref" ,
191
+ " xml" ,
192
+ " xmlrpc" ,
193
+ " zipapp" ,
194
+ " zipfile" ,
195
+ " zipimport" ,
196
+ " zlib" ,
197
+ " zoneinfo" ,
198
+
199
+ -- not built-in
33
200
" typing_extensions" ,
34
201
" setuptools" ,
35
- " subprocess" ,
36
- " xml" ,
37
202
38
203
-- third-party
39
204
" PIL" ,
@@ -42,6 +207,7 @@ M.default_import = {
42
207
" selenium" ,
43
208
" neptune" ,
44
209
" torch" ,
210
+ " pytest" ,
45
211
}
46
212
47
213
--- @type table<string , string>
You can’t perform that action at this time.
0 commit comments