-
Notifications
You must be signed in to change notification settings - Fork 3
docs: Port CLI documentation improvements from tmuxp#1010 and #1011 #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #339 +/- ##
==========================================
+ Coverage 87.16% 88.44% +1.27%
==========================================
Files 30 30
Lines 2821 2959 +138
==========================================
+ Hits 2459 2617 +158
+ Misses 362 342 -20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add linkable argument definitions with headerlinks (¶) - Update argparse_exemplar with improved section handling - Update sphinx_argparse_neo modules with enhanced rendering
- Use type narrowing pattern for subparser navigation in directive.py - Remove redundant cast in renderer return statement - Remove unused type: ignore comment in argparse_exemplar.py
Port test updates from tmuxp#1010 for headerlink and linking improvements
Consolidate light mode headerlink selectors and apply biome formatting
Replace tmuxp-specific examples with inline test module creation that works in any repository without external dependencies
Member
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
why: Mypy strict mode flagged type incompatibilities in test files. what: - Use typing.cast() for MockTranslator in test_nodes.py - Add TYPE_CHECKING import for HTML5Translator - Annotate input_nodes with list[nodes.Node] for invariance - Remove stale type: ignore[misc] comment
- feat(docs): Render argparse metadata as semantic definition list Replace pipe-separated format with <dl>/<dt>/<dd> structure - style(css): Use var(--code-font-size) for all argparse elements Add font-size to inline roles, pre.argparse-usage, .argparse-argument-name Add new .argparse-argument-meta flexbox styles - fix(lexer): Include underscores in lowercase metavar patterns Change [a-z][-a-z0-9]* to [a-z][-a-z0-9_]* in 6 locations - test(lexer): Add underscore metavar regression test Add fixtures and test for socket_name, config_file patterns
why: Sync test coverage with tmuxp PR #1011 for Required tag rendering. what: - Add type_name and required fields to ArgumentHTMLCase NamedTuple - Add metadata_definition_list test case for full metadata coverage - Add test_metadata_uses_definition_list and test_required_renders_as_tag - Update render_argument_to_html to accept and set new node attributes - Remove unused TYPE_CHECKING import and t.cast calls
Furo's "auto" theme follows system prefers-color-scheme. The meta tag dark styling only targeted explicit data-theme="dark", missing the auto-dark case where body:not([data-theme="light"]) applies.
The light mode override for headerlink colors used body:not([data-theme="dark"]) which incorrectly matches auto mode even when system is dark. Split into explicit light selector plus media query for auto + system light.
why: just watch-mypy uses find to include all .py files, bypassing pyproject.toml's exclude setting for tests/docs/. what: - Restore TYPE_CHECKING import for HTML5Translator - Restore t.cast calls for MockTranslator arguments
why: Document user-facing changes from tmuxp#1010 and #1011 ports. what: - Linkable arguments with permalinks - Structured metadata display (Default, Type, Choices) - Required tag with amber highlight - Dark mode support
Replace tmuxp-specific examples with generic "myapp" in doctests and comments.
Replace tmuxp examples in tests with generic "myapp".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Ports CLI documentation improvements from tmuxp#1010 and #1011:
Changes
docs/_ext/sphinx_argparse_neo/modulesdocs/_ext/argparse_exemplar.pydocs/_static/css/argparse-highlight.csstests/docs/_ext/Reference