gh-116991: Improve `pygen --help` for `python` subparser (#116992) · python/cpython@1e5f615

GitHub

File tree

Tools/peg_generator/pegen

Original file line numberDiff line numberDiff line change@@ -107,7 +107,10 @@ def generate_python_code(

107107help="Suppress code emission for rule actions",

108108)

109109110-python_parser=subparsers.add_parser("python", help="Generate Python code")

110+python_parser=subparsers.add_parser(

111+"python",

112+help="Generate Python code, needs grammar definition with Python actions",

113+)

111114python_parser.set_defaults(func=generate_python_code)

112115python_parser.add_argument("grammar_filename", help="Grammar description")

113116python_parser.add_argument(