Commit ea07c7f
authored
docs(cli) Custom argparse documentation engine with syntax highlighting (#1009)
Replace external `sphinx-argparse` dependency with custom `sphinx_argparse_neo` extensions, ported from vcspull project. Adds comprehensive documentation infrastructure for CLI commands.
## Changes
### New Extensions
- `docs/_ext/sphinx_argparse_neo/` - Complete argparse documentation engine
- `docs/_ext/argparse_exemplar.py` - Transforms epilog examples into TOC sections
- `docs/_ext/argparse_lexer.py` - Pygments lexers for CLI syntax highlighting
- `docs/_ext/argparse_roles.py` - RST roles for inline CLI formatting
- `docs/_static/css/argparse-highlight.css` - Styling for usage blocks and code
### Bug Fixes
- Use slice assignment for docutils node children manipulation (fixes parent tracking)
- Add type annotation to fix mypy `no-any-return` error
- Escape asterisks in glob patterns to prevent RST emphasis warnings
- Add ID prefix to avoid duplicate section IDs across subcommand pages
### Documentation
- Restructure CLI command pages to match vcspull pattern
- Add doctest exceptions to AGENTS.md for Sphinx visitor patterns
- Add doctests to `_create_example_section()` and `_extract_mutex_groups()`
### Removed
- `pretty_argparse.py` (replaced by new extensions)
- `sphinx-argparse` dependencyFile tree
43 files changed
+8603
-998
lines changed- docs
- _ext
- sphinx_argparse_neo
- _static/css
- cli
- tests/docs
- _ext
- sphinx_argparse_neo
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+8603
-998
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
35 | 56 | | |
36 | 57 | | |
37 | 58 | | |
| |||
0 commit comments