summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorBatuhan Taşkaya <47358913+isidentical@users.noreply.github.com>2019-12-16 18:23:27 (GMT)
committerVictor Stinner <vstinner@python.org>2019-12-16 18:23:27 (GMT)
commit814d687c7df3e0c60036943b68ece13f9f19dfef (patch)
treecec9acadee590122758df6220ae9b4c6139962dd /Doc/library
parenta322f50c369e2e4138266c88e32ef83af95b2da6 (diff)
downloadcpython-814d687c7df3e0c60036943b68ece13f9f19dfef.zip
cpython-814d687c7df3e0c60036943b68ece13f9f19dfef.tar.gz
cpython-814d687c7df3e0c60036943b68ece13f9f19dfef.tar.bz2
bpo-38348: Extend command line options of ast parsing tool (GH-16540)
Add -i and --indent (indentation level), and --no-type-comments (type comments) command line options to ast parsing tool.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/ast.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index a7e0729..baf563f 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -381,10 +381,19 @@ The following options are accepted:
Specify what kind of code must be compiled, like the *mode* argument
in :func:`parse`.
+.. cmdoption:: --no-type-comments
+
+ Don't parse type comments.
+
.. cmdoption:: -a, --include-attributes
Include attributes such as line numbers and column offsets.
+.. cmdoption:: -i <indent>
+ --indent <indent>
+
+ Indentation of nodes in AST (number of spaces).
+
If :file:`infile` is specified its contents are parsed to AST and dumped
to stdout. Otherwise, the content is read from stdin.