mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
gh-131178: Add tests for ast
command-line interface (#133329)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
40be123499
commit
6ce60f1574
2 changed files with 167 additions and 17 deletions
|
@ -626,7 +626,7 @@ def unparse(ast_obj):
|
|||
return unparser.visit(ast_obj)
|
||||
|
||||
|
||||
def main():
|
||||
def main(args=None):
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
@ -643,7 +643,7 @@ def main():
|
|||
'column offsets')
|
||||
parser.add_argument('-i', '--indent', type=int, default=3,
|
||||
help='indentation of nodes (number of spaces)')
|
||||
args = parser.parse_args()
|
||||
args = parser.parse_args(args)
|
||||
|
||||
if args.infile == '-':
|
||||
name = '<stdin>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue