File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 91
91
from mypy .renaming import LimitedVariableRenameVisitor , VariableRenameVisitor
92
92
from mypy .stats import dump_type_stats
93
93
from mypy .stubinfo import (
94
- is_legacy_bundled_package ,
95
94
legacy_bundled_packages ,
96
95
non_bundled_packages ,
97
96
stub_distribution_name ,
@@ -2672,7 +2671,10 @@ def find_module_and_diagnose(
2672
2671
# negatives. (Unless there are stubs but they are incomplete.)
2673
2672
global_ignore_missing_imports = manager .options .ignore_missing_imports
2674
2673
if (
2675
- any ("." .join (id_components [:i ]) in legacy_bundled_packages for i in range (len (id_components ), 0 , - 1 ))
2674
+ any (
2675
+ "." .join (id_components [:i ]) in legacy_bundled_packages
2676
+ for i in range (len (id_components ), 0 , - 1 )
2677
+ )
2676
2678
and global_ignore_missing_imports
2677
2679
and not options .ignore_missing_imports_per_module
2678
2680
and result is ModuleNotFoundReason .APPROVED_STUBS_NOT_INSTALLED
Original file line number Diff line number Diff line change @@ -3138,9 +3138,11 @@ import bleach.xyz
3138
3138
from bleach.abc import fgh
3139
3139
[file bleach/__init__.pyi]
3140
3140
[out]
3141
- main:1: error: Cannot find implementation or library stub for module named "bleach.xyz"
3141
+ main:1: error: Library stubs not installed for "bleach.xyz"
3142
+ main:1: note: Hint: "python3 -m pip install types-bleach"
3143
+ main:1: note: (or run "mypy --install-types" to install all missing stub packages)
3142
3144
main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
3143
- main:2: error: Cannot find implementation or library stub for module named "bleach.abc"
3145
+ main:2: error: Library stubs not installed for "bleach.abc"
3144
3146
3145
3147
[case testMissingSubmoduleOfInstalledStubPackageIgnored]
3146
3148
# flags: --ignore-missing-imports
You can’t perform that action at this time.
0 commit comments