8000 Various doc updates by gvanrossum · Pull Request #3314 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Various doc updates #3314

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

Merged
merged 6 commits into from
May 3, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Document quick mode
  • Loading branch information
Guido van Rossum committed May 3, 2017
commit 52de25d2b1a7a8ac06552ad5168b7f1f89db5715
18 changes: 16 additions & 2 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ Here are some more useful flags:
the base class even though that may not actually be the case. This
flag makes mypy raise an error instead.

- ``--incremental`` is an experimental option that enables incremental
type checking. When enabled, mypy caches results from previous runs
.. _incremental:

- ``--incremental`` is an experimental option that enables a module
cache. When enabled, mypy caches results from previous runs
to speed up type checking. Incremental mode can help when most parts
of your program haven't changed since the previous mypy run. A
companion flag is ``--cache-dir DIR``, which specifies where the
Expand All @@ -310,6 +312,18 @@ Here are some more useful flags:
``--cache-dir=/dev/null`` (UNIX) or ``--cache-dir=nul`` (Windows).
Cache files belonging to a different mypy version are ignored.

.. _quick:

- ``--quick-and-dirty`` is an experimental, unsafe variant of
:ref:`incremental mode <incremental>`. Quick mode is faster than
regular incremental mode, because it only re-checks modules that
were modified since their cache file was last written (regular
incremental mode also re-checks all modules that depend on one or
more modules that were re-checked). Quick mode is unsafe because it
may miss problems caused by a change in a dependency. Quick mode
updates the cache, but regular incremental mode ignores cache files
written by quick mode.

- ``--python-version X.Y`` will make mypy typecheck your code as if it were
run under Python version X.Y. Without this option, mypy will default to using
whatever version of Python is running mypy. Note that the ``-2`` and
Expand Down
14 changes: 9 additions & 5 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@ The following global flags may only be set in the global section
- ``dump_inference_stats`` (Boolean, default False) dumps stats about
type inference.

- ``incremental`` (Boolean, default False) enables the experimental
module cache.
- ``incremental`` (Boolean, default False) enables :ref:`incremental
mode <incremental>`.

- ``cache_dir`` (string, default ``.mypy_cache``) stores module cache
info in the given folder in incremental mode. The cache is only
read in incremental mode, but it is always written unless the value
is set to ``/dev/null`` (UNIX) or ``nul`` (Windows).
info in the given folder in :ref:`incremental mode <incremental>`.
The cache is only read in incremental mode, but it is always written
unless the value is set to ``/dev/null`` (UNIX) or ``nul``
(Windows).

- ``quick_and_dirty`` (Boolean, default False) enables :ref:`quick
mode <quick>`.

- ``show_error_context`` (Boolean, default False) shows
context notes before errors.
Expand Down
0