Skip to content
Merged
Changes from all commits
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
11 changes: 6 additions & 5 deletions pep-0484.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1515,10 +1515,10 @@ error refers to::
'not_found': http.client.NOT_FOUND # type: ignore
}

A ``# type: ignore`` comment on a line by itself is equivalent to
adding an inline ``# type: ignore`` to each line until the end of
the current indented block. At top indentation level this has
effect of disabling type checking until the end of file.
A ``# type: ignore`` comment on a line by itself at the top of a file,
before any docstrings, imports, or other executable code, silences all
errors in the file. Blank lines and other comments, such as shebang
lines and coding cookies, may precede the ``# type: ignore`` comment.

In some cases, linting tools or other comments may be needed on the same
line as a type comment. In these cases, the type comment should be before
Expand All @@ -1527,7 +1527,8 @@ other comments and linting markers:
# type: ignore # <comment or other marker>

If type hinting proves useful in general, a syntax for typing variables
may be provided in a future Python version.
may be provided in a future Python version. (**UPDATE**: This syntax
was added in Python 3.6 through PEP 526.)

Casts
=====
Expand Down