Skip to content

Commit

Permalink
Docs and changelog for --ignore-existing-annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Jan 19, 2018
1 parent 79c7914 commit ff1dfc8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
master
------

* Add ``--ignore-existing-annotations`` option to ``monkeytype stub``. Merge of
#55, fixes #15. Thanks Tai-Lin!


18.1.11
-------

Expand Down
15 changes: 13 additions & 2 deletions doc/generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ understands the code.
Options
~~~~~~~

Both ``monkeytype stub`` and ``monkeytype apply`` accept the same set of
options:
Both ``monkeytype stub`` and ``monkeytype apply`` accept the following options:

.. option:: -c <config-path>, --config <config-path>

Expand Down Expand Up @@ -95,6 +94,18 @@ options:
See the :meth:`~monkeytype.config.Config.include_unparsable_defaults` config
method.

Additionally, ``monkeytype stub`` accepts:

.. option:: --ignore-existing-annotations

Generate a stub based only on traced calls, ignoring any existing type
annotations in the code. (By default, existing annotations in the code take
precedence over traced types.) This can be useful for validating the
correctness of existing annotations.

This option is not usable with ``monkeytype apply``, since it would
frequently result in a conflict when attempting to apply annotations.

.. module:: monkeytype.typing

.. _rewriters:
Expand Down

0 comments on commit ff1dfc8

Please sign in to comment.