This is an automated email from the ASF dual-hosted git repository.
yzheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new b5e051831 Change parser option to be required (#3413)
b5e051831 is described below
commit b5e051831eff38c0f7d19f870871ba295b239162
Author: Yong Zheng <[email protected]>
AuthorDate: Mon Jan 12 16:14:19 2026 -0600
Change parser option to be required (#3413)
---
client/python/apache_polaris/cli/options/parser.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/python/apache_polaris/cli/options/parser.py
b/client/python/apache_polaris/cli/options/parser.py
index 0522efa2b..4a66dd906 100644
--- a/client/python/apache_polaris/cli/options/parser.py
+++ b/client/python/apache_polaris/cli/options/parser.py
@@ -112,14 +112,14 @@ class Parser(object):
)
if option.children:
children_subparser = option_parser.add_subparsers(
- dest=f"{option.name}_subcommand", required=False
+ dest=f"{option.name}_subcommand", required=True
)
recurse_options(children_subparser, option.children)
parser = TreeHelpParser(description="Polaris CLI")
add_arguments(parser, Parser._ROOT_ARGUMENTS)
- subparser = parser.add_subparsers(dest="command", required=False)
+ subparser = parser.add_subparsers(dest="command", required=True)
recurse_options(subparser, OptionTree.get_tree())
return parser