Skip to content

Commit 5eed022

Browse files
committed
gate feature with prefer_simple_messages
1 parent 2b33bdb commit 5eed022

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ def module_not_found(
31923192
code = codes.IMPORT
31933193
errors.report(line, 0, msg.format(module=target), code=code)
31943194

3195-
if reason == ModuleNotFoundReason.NOT_FOUND:
3195+
if reason == ModuleNotFoundReason.NOT_FOUND and not errors.prefer_simple_messages():
31963196
top_level_target = target.split(".")[0]
31973197
known_modules = get_known_modules(
31983198
manager.find_module_cache.stdlib_py_versions,

0 commit comments

Comments
 (0)