Commit d927c6c
committed
Fix MYPY lint: key the torch import exemption on the imported module
The [mypy-.github.scripts.build_report] section never matched: with no
__init__.py in that directory mypy names the module build_report, not the
dotted path, so import-not-found was still reported for torch and
torchvision.
Use ignore_missing_imports on the imported modules instead, which is how mypy
resolves third-party modules that are absent from the lint environment.
Verified with mypy 1.13.0 (the pinned version) against mypy.ini: clean.1 parent 3edf8f3 commit d927c6c
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
| |||
75 | 70 | | |
76 | 71 | | |
77 | 72 | | |
78 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments