From 3fc2f801fc10cce0a9f4d160f3e5a2f5e1dde15d Mon Sep 17 00:00:00 2001 From: Ahmet Faruk Ilhan Date: Wed, 8 Jul 2026 18:29:18 +0200 Subject: [PATCH 1/2] Clarify implicit_reexport with strict mode --- docs/source/config_file.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index d5431b1476aa0..bc4dd6eea62a7 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -837,6 +837,10 @@ section of the command line docs. the item is imported using from-as or is included in ``__all__``. Note that mypy treats stub files as if this is always disabled. For example: + Although this option is enabled by default, :confval:`strict` enables + :option:`mypy --no-implicit-reexport`. Set ``implicit_reexport = true`` + explicitly if you want to keep implicit reexports when using strict mode. + .. code-block:: python # This won't re-export the value From a86b2df74e67b3106212055e5a1fa75ae81c2250 Mon Sep 17 00:00:00 2001 From: Ahmet Faruk Ilhan Date: Wed, 8 Jul 2026 21:37:59 +0200 Subject: [PATCH 2/2] Move implicit_reexport strict note after example --- docs/source/config_file.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index bc4dd6eea62a7..5bda5e545d689 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -837,10 +837,6 @@ section of the command line docs. the item is imported using from-as or is included in ``__all__``. Note that mypy treats stub files as if this is always disabled. For example: - Although this option is enabled by default, :confval:`strict` enables - :option:`mypy --no-implicit-reexport`. Set ``implicit_reexport = true`` - explicitly if you want to keep implicit reexports when using strict mode. - .. code-block:: python # This won't re-export the value @@ -851,6 +847,10 @@ section of the command line docs. from foo import bar __all__ = ['bar'] + Although this option is enabled by default, :confval:`strict` enables + :option:`mypy --no-implicit-reexport`. Set ``implicit_reexport = true`` + explicitly if you want to keep implicit reexports when using strict mode. + .. confval:: strict_equality :type: boolean