File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1770,8 +1770,6 @@ Type annotations
17701770 A ``# type: ignore `` comment located at *lineno *.
17711771 *tag * is the optional tag specified by the form ``# type: ignore <tag> ``.
17721772
1773- See :func: `ast.parse ` for more details.
1774-
17751773 .. doctest ::
17761774
17771775 >>> print (ast.dump(ast.parse(' x = 1 # type: ignore' , type_comments = True ), indent = 4 ))
@@ -1794,6 +1792,10 @@ Type annotations
17941792 type_ignores=[
17951793 TypeIgnore(lineno=1, tag='[assignment]')])
17961794
1795+ .. note ::
1796+ :class: `!TypeIgnore ` nodes are not generated when the *type_comments * parameter
1797+ is set to ``False `` (default). See :func: `ast.parse ` for more details.
1798+
17971799 .. versionadded :: 3.8
17981800
17991801.. _ast-type-params :
You can’t perform that action at this time.
0 commit comments