You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| module | the module path to where the parser is defined |
35
-
| func | the name of the function that once called with no arguments constructs the parser |
36
-
| prog | (optional) when provided, overwrites the `<prog>` name. |
37
-
| hook | (optional) hook `argparse` to retrieve the parser if `func` uses a parser instead of returning it. |
38
-
| title | (optional) when provided, overwrites the `<prog> - CLI interface` title added by default and when empty, will not be included |
39
-
| description | (optional) when provided, overwrites the description and when empty, will not be included |
40
-
| epilog | (optional) when provided, overwrites the epilog and when empty, will not be included |
41
-
| usage_width | (optional) how large should usage examples be - defaults to 100 character |
42
-
| usage_first | (optional) show usage before description |
43
-
| group_title_prefix | (optional) groups subsections title prefixes, accepts the string `{prog}` as a replacement for the program name - defaults to `{prog}`|
44
-
| group_sub_title_prefix | (optional) subcommands groups subsections title prefixes, accepts replacement of `{prog}` and `{subcommand}` for program and subcommand name - defaults to `{prog} {subcommand}`|
45
-
| no_default_values | (optional) suppresses generation of `default` entries |
46
-
| force_refs_lower | (optional) Sphinx `:ref:` only supports lower-case references. With this, any capital letter in generated reference anchors are lowered and given an `_` prefix (i.e. `A` becomes `_a`) |
| module | the module path to where the parser is defined |
37
+
| func | the name of the function that once called with no arguments constructs the parser |
38
+
| prog | (optional) when provided, overwrites the `<prog>` name. |
39
+
| hook | (optional) hook `argparse` to retrieve the parser if `func` uses a parser instead of returning it. |
40
+
| title | (optional) when provided, overwrites the `<prog> - CLI interface` title added by default and when empty, will not be included |
41
+
| description | (optional) when provided, overwrites the description and when empty, will not be included |
42
+
| epilog | (optional) when provided, overwrites the epilog and when empty, will not be included |
43
+
| usage_width | (optional) how large should usage examples be - defaults to 100 character |
44
+
| usage_first | (optional) show usage before description |
45
+
| group_title_prefix | (optional) groups subsections title prefixes, accepts the string `{prog}` as a replacement for the program name - defaults to `{prog}`|
46
+
| group_sub_title_prefix | (optional) subcommands groups subsections title prefixes, accepts replacement of `{prog}` and `{subcommand}` for program and subcommand name - defaults to `{prog} {subcommand}`|
47
+
| no_default_values | (optional) suppresses generation of `default` entries |
48
+
| force_refs_lower | (optional) Sphinx `:ref:` only supports lower-case references. With this, any capital letter in generated reference anchors are lowered and given an `_` prefix (i.e. `A` becomes `_a`) |
49
+
50
+
> > > > > > > bda12fb (Declare 3.13 support and drop 3.9) For example:
48
51
49
52
```rst
50
53
.. sphinx_argparse_cli::
@@ -86,11 +89,12 @@ being `cli`:
86
89
- to refer to flag `--magic` of the `run` sub-command use ``:ref:`cli:tox-run---magic` ``.
87
90
88
91
Due to Sphinx's `:ref:` only supporting lower-case values, if you need to distinguish mixed case program names or
89
-
arguments, set the `:force_refs_lower:` argument. With this flag, captial-letters in references will be converted to
90
-
their lower-case counterpart and prefixed with an `_`. For example:
92
+
arguments, set the `:force_refs_lower:` argument. With this flag, captial-letters in references will be converted to
93
+
their lower-case counterpart and prefixed with an `_`. For example:
91
94
92
95
- A `prog` name `SampleProgram` will be referenced as ``:ref:`_sample_program...` ``.
93
-
- To distinguish between mixed case flags `-a` and `-A` use ``:ref:`_sample_program--a` `` and ``:ref:`_sample_program--_a` `` respectively
96
+
- To distinguish between mixed case flags `-a` and `-A` use ``:ref:`_sample_program--a` `` and
97
+
``:ref:`_sample_program--_a` `` respectively
94
98
95
99
Note that if you are _not_ concernced about using internal Sphinx `:ref:` cross-references, you may choose to leave this
96
100
off to maintain mixed-case anchors in your output HTML; but be aware that later enabling it will change your anchors in
0 commit comments