File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ Sort ``--generated-rcfile`` output.
2+
3+ Refs #7655
Original file line number Diff line number Diff line change @@ -437,7 +437,10 @@ def generate_config(
437437 )
438438 options_by_section = {}
439439 sections = []
440- for group in self ._arg_parser ._action_groups :
440+ for group in sorted (
441+ self ._arg_parser ._action_groups ,
442+ key = lambda x : (x .title != "Main" , x .title ),
443+ ):
441444 group_name = group .title
442445 assert group_name
443446 if group_name in skipsections :
@@ -449,7 +452,7 @@ def generate_config(
449452 for i in group ._group_actions
450453 if not isinstance (i , argparse ._SubParsersAction )
451454 ]
452- for opt in option_actions :
455+ for opt in sorted ( option_actions , key = lambda x : x . option_strings [ 0 ][ 2 :]) :
453456 if "--help" in opt .option_strings :
454457 continue
455458
You can’t perform that action at this time.
0 commit comments