From 1e5f615086d23c71a9701abe641b5241e4345234 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 3 Jun 2024 10:52:35 +0300 Subject: [PATCH] gh-116991: Improve `pygen --help` for `python` subparser (#116992) --- Tools/peg_generator/pegen/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tools/peg_generator/pegen/__main__.py b/Tools/peg_generator/pegen/__main__.py index 262c8a6db68..0b0b4b291c2 100755 --- a/Tools/peg_generator/pegen/__main__.py +++ b/Tools/peg_generator/pegen/__main__.py @@ -107,7 +107,10 @@ c_parser.add_argument( help="Suppress code emission for rule actions", ) -python_parser = subparsers.add_parser("python", help="Generate Python code") +python_parser = subparsers.add_parser( + "python", + help="Generate Python code, needs grammar definition with Python actions", +) python_parser.set_defaults(func=generate_python_code) python_parser.add_argument("grammar_filename", help="Grammar description") python_parser.add_argument(