Skip to content
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
9 changes: 7 additions & 2 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,17 @@ definitions or calls.
.. option:: --disallow-untyped-defs

This flag reports an error whenever it encounters a function definition
without type annotations.
with without type annotations or with incomplete type annotations.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It looks like this "with" doesn't belong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(a superset of :option:`--disallow-incomplete-defs`).

For example, it would report an error for :code:`def f(a, b)` and :code:`def f(a: int, b)`.

.. option:: --disallow-incomplete-defs

This flag reports an error whenever it encounters a partly annotated
function definition.
function definition, while still allowing entirely unannotated definitions.

For example, it would report an error for :code:`def f(a: int, b)` but not :code:`def f(a, b)`.

.. option:: --check-untyped-defs

Expand Down
9 changes: 7 additions & 2 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,19 @@ section of the command line docs.
:default: False

Disallows defining functions without type annotations or with incomplete type
annotations.
annotations (a superset of :confval:`disallow_incomplete_defs`).

For example, it would report an error for :code:`def f(a, b)` and :code:`def f(a: int, b)`.

.. confval:: disallow_incomplete_defs

:type: boolean
:default: False

Disallows defining functions with incomplete type annotations.
Disallows defining functions with incomplete type annotations, while still
allowing entirely unannotated definitions.

For example, it would report an error for :code:`def f(a: int, b)` but not :code:`def f(a, b)`.

.. confval:: check_untyped_defs

Expand Down