Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat and reorganize the config file docs #5595

Merged
merged 3 commits into from
Sep 15, 2018
Merged
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
23 changes: 15 additions & 8 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ imports.
compliant packages. Adding this flag will disable this behavior.


.. _platform-configuration:

Platform configuration
**********************

Expand Down Expand Up @@ -169,12 +171,15 @@ For more information on how to use these flags, see :ref:`version_and_platform_c
compile-time constants that are always false. This flag may
be repeated.

.. _disallow-any:
.. _disallow-dynamic-typing:

Disallow dynamic typing
***********************

Disallow Any
************
The ``Any`` type is used represent a value that has a :ref:`dynamic type <dynamic-typing>`.
The ``--disallow-any`` family of flags will disallow various uses of the ``Any`` type in
a module -- this lets us strategically disallow the use of dynamic typing in a controlled way.

The ``--disallow-any`` family of flags disallows various types of ``Any`` in a module.
The following options are available:

``--disallow-any-unimported``
Expand Down Expand Up @@ -208,8 +213,6 @@ The following options are available:
``dict``) become disallowed as you should use their aliases from the typing
module (such as ``List[int]`` and ``Dict[str, str]``).

.. _disallow-subclassing-any:

``--disallow-subclassing-any``
This flag reports an error whenever a class subclasses a value of
type ``Any``. This may occur when the base class is imported from
Expand Down Expand Up @@ -239,8 +242,6 @@ definitions or calls.
This flag reports an error whenever it encounters a function definition
without type annotations.

.. _disallow-incomplete-defs:

``--disallow-incomplete-defs``
This flag reports an error whenever it encounters a partly annotated
function definition.
Expand All @@ -258,6 +259,7 @@ definitions or calls.
This flag reports an error whenever a function with type annotations
is decorated with a decorator without annotations.

.. _none-and-optional-handling:

None and Optional handling
**************************
Expand Down Expand Up @@ -299,6 +301,7 @@ For more details, see :ref:`no_strict_optional`.
mypy 0.600, and in previous versions it had to be explicitly enabled
using ``--strict-optional`` (which is still accepted).

.. _configuring-warnings:

Configuring warnings
********************
Expand Down Expand Up @@ -353,6 +356,8 @@ of the above sections.
Note: the exact list of flags enabled by running ``--strict`` may change
over time.

.. _configuring-error-messages:

Configuring error messages
**************************

Expand Down Expand Up @@ -440,6 +445,8 @@ beyond what incremental mode can offer, try running mypy in
We recommend that you try using the :ref:`mypy_daemon` before
attempting to use this feature.

.. _advanced-flags:

Advanced flags
**************

Expand Down
Loading