Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ The following flags adjust how mypy handles values of type ``None``.
.. warning::

``--no-strict-optional`` is evil. Avoid using it and definitely do
not use it without understanding what it does.
not use it without understanding what it does. See
:ref:`Kinds of types <strict_optional>` for more information.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this say Kinds of types? Why do you need to link this when the documentation is right above?



.. _configuring-warnings:
Expand Down
12 changes: 7 additions & 5 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,17 @@ section of the command line docs.
:type: boolean
:default: True

Effectively disables checking of optional
types and ``None`` values. With this option, mypy doesn't
generally check the use of ``None`` values -- it is treated
as compatible with every type.
Enables checking of optional types and ``None`` values.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to explain what the default does, IMO. Instead, explain what disabling this does. The previous documentation was better, it just needed a "When set to False" before it.

Setting this option to ``false`` effectively disables checking
of optional types and ``None`` values. With
``strict_optional = false``, mypy doesn't generally check the use
of ``None`` values -- it is treated as compatible with every type.

.. warning::

``strict_optional = false`` is evil. Avoid using it and definitely do
not use it without understanding what it does.
not use it without understanding what it does. See
:ref:`Kinds of types <strict_optional>` for more information.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.



Configuring warnings
Expand Down
Loading