Skip to content

Commit fbdd798

Browse files
authored
Add 0.520 to revision history (#3688)
Also mark TypedDict as not officially supported. Update command line help
1 parent 005fd6b commit fbdd798

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

docs/source/command_line.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ flag (or its long form ``--help``)::
1111
usage: mypy [-h] [-v] [-V] [--python-version x.y] [--platform PLATFORM] [-2]
1212
[--ignore-missing-imports]
1313
[--follow-imports {normal,silent,skip,error}]
14+
[--disallow-any {unimported, expr, unannotated, decorated, explicit, generics}]
1415
[--disallow-untyped-calls] [--disallow-untyped-defs]
1516
[--check-untyped-defs] [--disallow-subclassing-any]
1617
[--warn-incomplete-stub] [--warn-redundant-casts]
1718
[--no-warn-no-return] [--warn-return-any] [--warn-unused-ignores]
18-
[--show-error-context] [-i] [--quick-and-dirty] [--cache-dir DIR]
19+
[--show-error-context] [--no-implicit-optional] [-i]
20+
[--quick-and-dirty] [--cache-dir DIR] [--skip-version-check]
1921
[--strict-optional]
2022
[--strict-optional-whitelist [GLOB [GLOB ...]]]
2123
[--junit-xml JUNIT_XML] [--pdb] [--show-traceback] [--stats]
2224
[--inferstats] [--custom-typing MODULE]
2325
[--custom-typeshed-dir DIR] [--scripts-are-modules]
2426
[--config-file CONFIG_FILE] [--show-column-numbers]
25-
[--find-occurrences CLASS.MEMBER] [--strict] [--strict-boolean]
27+
[--find-occurrences CLASS.MEMBER] [--strict]
28+
[--shadow-file SOURCE_FILE SHADOW_FILE] [--any-exprs-report DIR]
2629
[--cobertura-xml-report DIR] [--html-report DIR]
2730
[--linecount-report DIR] [--linecoverage-report DIR]
2831
[--memory-xml-report DIR] [--old-html-report DIR]
@@ -427,13 +430,21 @@ Here are some more useful flags:
427430
- ``--strict`` mode enables all optional error checking flags. You can see the
428431
list of flags enabled by strict mode in the full ``mypy -h`` output.
429432

433+
.. _shadow-file:
434+
430435
- ``--shadow-file SOURCE_FILE SHADOW_FILE`` makes mypy typecheck SHADOW_FILE in
431436
place of SOURCE_FILE. Primarily intended for tooling. Allows tooling to
432437
make transformations to a file before type checking without having to change
433438
the file in-place. (For example, tooling could use this to display the type
434439
of an expression by wrapping it with a call to reveal_type in the shadow
435440
file and then parsing the output.)
436441

442+
.. _no-implicit-optional:
443+
444+
- ``--no-implicit-optional`` causes mypy to stop treating arguments
445+
with a ``None`` default value as having an implicit ``Optional[...]``
446+
type.
447+
437448
For the remaining flags you can read the full ``mypy -h`` output.
438449

439450
.. note::

docs/source/kinds_of_types.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,9 +1159,16 @@ demonstrates how to work with coroutines. One version
11591159
and one
11601160
`uses yield from <https://github.com/python/mypy/blob/master/test-data/samples/crawl.py>`_.
11611161

1162+
.. _typeddict:
1163+
11621164
TypedDict
11631165
*********
11641166

1167+
.. note::
1168+
1169+
TypedDict is not yet an officially supported feature. It may not work reliably,
1170+
and details of TypedDict may change in future mypy releases.
1171+
11651172
Python programs often use dictionaries with string keys to represent objects.
11661173
Here is a typical example:
11671174

@@ -1255,11 +1262,6 @@ subtyping, as discussed below).
12551262
12561263
pip install --upgrade mypy-extensions
12571264
1258-
.. note::
1259-
1260-
TypedDict is experimental. Details of TypedDict may change in
1261-
future mypy releases.
1262-
12631265
Totality
12641266
--------
12651267

docs/source/revision_history.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ Revision history
33

44
List of major changes:
55

6+
- July 2017
7+
* Publish ``mypy`` version 0.520 on PyPI.
8+
9+
* Add :ref:`fine-grained control of Any types <disallow-any>`.
10+
11+
* Add :ref:`typeddict`.
12+
13+
* Other updates to :ref:`command-line`:
14+
15+
* Add ``--no-implicit-optional``.
16+
17+
* Add ``--shadow-file``.
18+
19+
* Add ``--no-incremental``.
20+
621
- May 2017
722
* Publish ``mypy`` version 0.510 on PyPI.
823

0 commit comments

Comments
 (0)