Skip to content

Commit 76824c9

Browse files
kirbyfan64gvanrossum
authored andcommitted
Fix #2308: Keep suppressed imports in the suppressed list (#3065)
* Fix #2308: Keep suppressed imports in the suppressed list
1 parent c6c201c commit 76824c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mypy/build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,9 @@ def load_graph(sources: List[BuildSource], manager: BuildManager) -> Graph:
16471647
# so we ignore any suppressed module not explicitly re-included
16481648
# from the command line.
16491649
ignored = dep in st.suppressed and dep not in entry_points
1650-
if dep not in graph and not ignored:
1650+
if ignored:
1651+
manager.missing_modules.add(dep)
1652+
elif dep not in graph:
16511653
try:
16521654
if dep in st.ancestors:
16531655
# TODO: Why not 'if dep not in st.dependencies' ?

0 commit comments

Comments
 (0)