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

Change specification of @no_type_check #1584

Closed
wants to merge 2 commits into from
Closed
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
12 changes: 8 additions & 4 deletions docs/spec/directives.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ This approach may also be useful to handle import cycles.
``@no_type_check``
------------------

To mark portions of the program that should not be covered by type
hinting, you can use the ``@typing.no_type_check`` decorator on a class or function.
Functions with this decorator should be treated as having
no annotations.
When applied to a function, ``@no_type_check`` indicates that static type
checkers should suppress all type-related errors within that function. From the
perspective of a caller, all of the function's parameters and return type are
always assumed to be Any, even if they are otherwise annotated or the type
checker would normally infer the return type.

When applied to a class, the behavior of ``@no_type_check`` unspecified;
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved
static type checkers should feel free to ignore it.

Version and platform checking
-----------------------------
Expand Down
Loading