Skip to content

Commit 8731ef9

Browse files
authored
Fixed some broken autoref links in the Zensical documentation (#1730)
* Fixed some broken autoref links in the Zensical documentation In the recent Zensical 0.0.56 some code that validates Python documentation automatic reference links has been fixed. This change fixes some broken links that got identified because we moved things around. * Fixed typo
1 parent e551228 commit 8731ef9

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

cmd2/parsing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class PartialStatement:
248248
249249
Note:
250250
Unlike [cmd2.parsing.Statement][], this is a simple data object
251-
and does not inherit from [str][].
251+
and does not inherit from `str`.
252252
253253
"""
254254

@@ -552,7 +552,7 @@ def parse(self, line: str) -> Statement:
552552
def parse_command_only(self, rawinput: str) -> PartialStatement:
553553
"""Identify the command and arguments from raw input.
554554
555-
Partially parse input into a [cmd2.PartialStatement][] object.
555+
Partially parse input into a [cmd2.parsing.PartialStatement][] object.
556556
557557
The command is identified, and shortcuts and aliases are expanded.
558558
Multiline commands are identified, but terminators and output
@@ -561,7 +561,7 @@ def parse_command_only(self, rawinput: str) -> PartialStatement:
561561
This method is optimized for completion code and gracefully handles
562562
unclosed quotes without raising exceptions.
563563
564-
[cmd2.parsing.PartialStatement.args][] will include all output redirection
564+
`cmd2.parsing.PartialStatement.args` will include all output redirection
565565
clauses and command terminators.
566566
567567
Note:
@@ -571,7 +571,7 @@ def parse_command_only(self, rawinput: str) -> PartialStatement:
571571
whitespace only if all quotes are closed.
572572
573573
:param rawinput: the command line as entered by the user
574-
:return: a [cmd2.PartialStatement][] object representing the split input
574+
:return: a `PartialStatement` object representing the split input
575575
576576
"""
577577
# Expand shortcuts and aliases

docs/features/argument_processing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,15 @@ benefit is that your `cmd2` applications now have more aesthetically pleasing he
226226
color to make it quicker and easier to visually parse help text. This works for all supported
227227
versions of Python.
228228

229-
- [Cmd2HelpFormatter][cmd2.argparse_utils.Cmd2HelpFormatter] - default help formatter class
230-
- [ArgumentDefaultsCmd2HelpFormatter][cmd2.argparse_utils.ArgumentDefaultsCmd2HelpFormatter] - adds
229+
- [Cmd2HelpFormatter][cmd2.rich_utils.Cmd2HelpFormatter] - default help formatter class
230+
- [ArgumentDefaultsCmd2HelpFormatter][cmd2.rich_utils.ArgumentDefaultsCmd2HelpFormatter] - adds
231231
default values to argument help
232-
- [MetavarTypeCmd2HelpFormatter][cmd2.argparse_utils.MetavarTypeCmd2HelpFormatter] - uses the
233-
argument 'type' as the default metavar value (instead of the argument 'dest')
234-
- [RawDescriptionCmd2HelpFormatter][cmd2.argparse_utils.RawDescriptionCmd2HelpFormatter] - retains
235-
any formatting in descriptions and epilogs
236-
- [RawTextCmd2HelpFormatter][cmd2.argparse_utils.RawTextCmd2HelpFormatter] - retains formatting of
237-
all help text
232+
- [MetavarTypeCmd2HelpFormatter][cmd2.rich_utils.MetavarTypeCmd2HelpFormatter] - uses the argument
233+
'type' as the default metavar value (instead of the argument 'dest')
234+
- [RawDescriptionCmd2HelpFormatter][cmd2.rich_utils.RawDescriptionCmd2HelpFormatter] - retains any
235+
formatting in descriptions and epilogs
236+
- [RawTextCmd2HelpFormatter][cmd2.rich_utils.RawTextCmd2HelpFormatter] - retains formatting of all
237+
help text
238238

239239
The default `Cmd2HelpFormatter` class inherits from `argparse.HelpFormatter`. If you want a
240240
different behavior, then pass the desired class to the `formatter_class` argument of your argparse

docs/upgrades.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ The major things users should be aware of when upgrading to 3.x are detailed in
7676
#### ansi
7777

7878
The functionality within the `cmd2.ansi` module has either been removed or changed to be based on
79-
`rich` and moved to one of the new modules: [cmd2.string_utils][], [cmd2.styles][], or
80-
[cmd2.terminal_utils][].
79+
`rich` and moved to one of the new modules: [cmd2.colors][], [cmd2.string_utils][], or
80+
[cmd2.styles][].
8181

8282
To ease the migration path from `cmd2` 2.x to 3.x, we have created the `cmd2-ansi` module which is a
8383
backport of the `cmd2.ansi` module present in `cmd2` 2.7.0 in a standalone fashion. Relevant links:
@@ -163,11 +163,11 @@ example for a demonstration of how to use the common [cmd2.string_utils.stylize]
163163
#### terminal_utils
164164

165165
Support for terminal control escape sequences for things like setting the window title and
166-
asynchronous alerts has been moved from `cmd2.ansi` to the new [cmd2.terminal_utils][] module.
166+
asynchronous alerts has been moved from `cmd2.ansi` to within the main `cmd2.Cmd` application class.
167167

168168
This isn't really intended to be used by end users, but is used by higher-level functionality that
169169
is intended to be used by end users such as [cmd2.Cmd.set_window_title][] and
170-
[cmd2.Cmd.async_alert][].
170+
[cmd2.Cmd.add_alert][].
171171

172172
See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/main/examples/async_printing.py)
173173
for an example of how to use this functionality in a `cmd2` application.
@@ -177,11 +177,11 @@ for an example of how to use this functionality in a `cmd2` application.
177177
`cmd2` now has 5 different Argparse HelpFormatter classes, all of which are based on the
178178
`RichHelpFormatter` class from [rich-argparse](https://github.com/hamdanal/rich-argparse).
179179

180-
- [Cmd2HelpFormatter][cmd2.argparse_custom.Cmd2HelpFormatter]
181-
- [ArgumentDefaultsCmd2HelpFormatter][cmd2.argparse_custom.ArgumentDefaultsCmd2HelpFormatter]
182-
- [MetavarTypeCmd2HelpFormatter][cmd2.argparse_custom.MetavarTypeCmd2HelpFormatter]
183-
- [RawDescriptionCmd2HelpFormatter][cmd2.argparse_custom.RawDescriptionCmd2HelpFormatter]
184-
- [RawTextCmd2HelpFormatter][cmd2.argparse_custom.RawTextCmd2HelpFormatter]
180+
- [Cmd2HelpFormatter][cmd2.rich_utils.Cmd2HelpFormatter]
181+
- [ArgumentDefaultsCmd2HelpFormatter][cmd2.rich_utils.ArgumentDefaultsCmd2HelpFormatter]
182+
- [MetavarTypeCmd2HelpFormatter][cmd2.rich_utils.MetavarTypeCmd2HelpFormatter]
183+
- [RawDescriptionCmd2HelpFormatter][cmd2.rich_utils.RawDescriptionCmd2HelpFormatter]
184+
- [RawTextCmd2HelpFormatter][cmd2.rich_utils.RawTextCmd2HelpFormatter]
185185

186186
Previously the default `Cmd2HelpFormatter` class inherited from `argparse.RawTextHelpFormatter`,
187187
however it now inherits from `argparse.HelpFormatter`. If you want RawText behavior, then pass

0 commit comments

Comments
 (0)