diff --git a/pep-0484.txt b/pep-0484.txt index 0da640594..d6b0da5a8 100644 --- a/pep-0484.txt +++ b/pep-0484.txt @@ -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 @@ -1527,7 +1527,8 @@ other comments and linting markers: # type: ignore # 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 =====