Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
One more tiny fix and comment
  • Loading branch information
ilevkivskyi committed Feb 12, 2026
commit d9c88e861c9c8cef07704175fc086a41c74b71e4
11 changes: 10 additions & 1 deletion mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,16 @@ def exist_added_packages(suppressed: list[str], manager: BuildManager) -> bool:
if not path:
continue
options = manager.options.clone_for_module(dep)
if options.follow_imports == "skip" and (
# Technically this is not 100% correct, since we can have:
# from pkg import mod
# with
# [mypy-pkg]
# follow-import = silent
# [mypy-pkg.mod]
# follow-imports = normal
# But such cases are extremely rare, and this allows us to avoid
# massive performance impact in much more common situations.
if options.follow_imports in ("skip", "error") and (
not path.endswith(".pyi") or options.follow_imports_for_stubs
):
continue
Expand Down