Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 70b6aa6

Browse files
committedOct 31, 2021
another fix for argparse in docbuild
1 parent 3a4c572 commit 70b6aa6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
 

Diff for: ‎src/sage_docbuild/__init__.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,7 @@ def setup_parser():
15581558

15591559
# Standard options. Note: We use explicit option.dest names
15601560
# to avoid ambiguity.
1561-
standard = argparse.OptionGroup(parser, "Standard")
1561+
standard = parser.add_argument_group("Standard")
15621562
standard.add_argument("-h", "--help",
15631563
action=help_message_short,
15641564
help="show a help message and exit")
@@ -1617,11 +1617,10 @@ def setup_parser():
16171617
standard.add_argument("-o", "--output", dest="output_dir", default=None,
16181618
metavar="DIR", action="store",
16191619
help="if DOCUMENT is a single file ('file=...'), write output to this directory")
1620-
parser.add_argument_group(standard)
16211620

16221621
# Advanced options.
1623-
advanced = argparse.OptionGroup(parser, "Advanced",
1624-
"Use these options with care.")
1622+
advanced = parser.add_argument_group("Advanced",
1623+
"Use these options with care.")
16251624
advanced.add_argument("-S", "--sphinx-opts", dest="sphinx_opts",
16261625
type="string", metavar="OPTS",
16271626
action="store",
@@ -1638,7 +1637,6 @@ def setup_parser():
16381637
help="if ARG is 'reference', list all subdocuments"
16391638
" of en/reference. If ARG is 'all', list all main"
16401639
" documents")
1641-
parser.add_argument_group(advanced)
16421640
return parser
16431641

16441642

0 commit comments

Comments
 (0)