Commit f576e84
Do not import List, Dict, and Set by default (#2863)
Fix #999
This is a straightforward fix: List, Set, and Dict are treated as aliases to their builtins counterparts, therefore they are ignored by remove_imported_names_from_symtable, I fix this by also removing the alias names.
The fix also revealed few places in mypy where imports were missing, and one bug in fastparse.py. Those have been fixed.
The fix also includes a typeshed sync at python/typeshed#933.1 parent 70b278c commit f576e84
File tree
9 files changed
+10
-8
lines changed- mypy
- test
- test-data
- samples
- unit
9 files changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
- stdlib/2/csv.pyi+4-4
- stdlib/3.4/pathlib.pyi+1-1
- stdlib/3/dis.pyi+1-1
- third_party/2and3/boto/s3/bucket.pyi+1-1
- third_party/2and3/sqlalchemy/sql/schema.pyi+1-1
- third_party/3/dateutil/parser.pyi+1-1
- third_party/3/dateutil/relativedelta.pyi+1-1
- third_party/3/dateutil/tz/tz.pyi+1-1
- third_party/3/typed_ast/__init__.pyi+2-2
- third_party/3/typed_ast/ast3.pyi+23-3
- third_party/3/typed_ast/conversions.pyi+2-2
0 commit comments