Skip to content

Commit 34a5b06

Browse files
committed
Docs: clarify strict_optional description and link to more details (#21658)
1 parent d17b99e commit 34a5b06

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

docs/source/command_line.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ The following flags adjust how mypy handles values of type ``None``.
466466
.. warning::
467467

468468
``--no-strict-optional`` is evil. Avoid using it and definitely do
469-
not use it without understanding what it does.
469+
not use it without understanding what it does. See
470+
:ref:`no-strict-optional` for more details.
470471

471472

472473
.. _configuring-warnings:

docs/source/config_file.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,15 +618,16 @@ section of the command line docs.
618618
:type: boolean
619619
:default: True
620620

621-
Effectively disables checking of optional
621+
If set to ``False``, effectively disables checking of optional
622622
types and ``None`` values. With this option, mypy doesn't
623623
generally check the use of ``None`` values -- it is treated
624624
as compatible with every type.
625625

626626
.. warning::
627627

628-
``strict_optional = false`` is evil. Avoid using it and definitely do
629-
not use it without understanding what it does.
628+
``strict_optional = False`` is evil. Avoid using it and definitely do
629+
not use it without understanding what it does. See
630+
:ref:`no-strict-optional` for more details.
630631

631632

632633
Configuring warnings

0 commit comments

Comments
 (0)