From af34e0a07bc06a6248b8229247e05d1c767b2f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Miedzi=C5=84ski?= Date: Tue, 16 May 2017 18:40:17 +0200 Subject: [PATCH] Fix ModuleNotFoundError typo in import reference (#1606) --- Doc/reference/import.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst index 4dbd9d88c30..9475b8d55c2 100644 --- a/Doc/reference/import.rst +++ b/Doc/reference/import.rst @@ -890,7 +890,7 @@ import statements within that module. To selectively prevent import of some modules from a hook early on the meta path (rather than disabling the standard import system entirely), -it is sufficient to raise :exc:`ModuleNoFoundError` directly from +it is sufficient to raise :exc:`ModuleNotFoundError` directly from :meth:`~importlib.abc.MetaPathFinder.find_spec` instead of returning ``None``. The latter indicates that the meta path search should continue, while raising an exception terminates it immediately.