From bc6682292725074bfef87df07a8ee847ea5abe49 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 21:36:19 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mypy/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mypy/build.py b/mypy/build.py index 8eef02aead5ee..4f10b7e5ffc5a 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -2671,7 +2671,10 @@ def find_module_and_diagnose( # negatives. (Unless there are stubs but they are incomplete.) global_ignore_missing_imports = manager.options.ignore_missing_imports if ( - any(".".join(id_components[:i]) in legacy_bundled_packages for i in range(len(id_components), 0, -1)) + any( + ".".join(id_components[:i]) in legacy_bundled_packages + for i in range(len(id_components), 0, -1) + ) and global_ignore_missing_imports and not options.ignore_missing_imports_per_module and result is ModuleNotFoundReason.APPROVED_STUBS_NOT_INSTALLED