Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Jan 25, 2026

Summary

Ports CLI documentation improvements from tmuxp#1010 and #1011:

  • Linkable argument definitions with headerlinks (¶)
  • Semantic metadata rendering as definition lists (Default, Type, Choices)
  • Required tag with amber highlight styling
  • CSS consolidation with biome formatting
  • Dark mode support for all new styling
  • Updated tests for sphinx_argparse_neo

Changes

  • Updated docs/_ext/sphinx_argparse_neo/ modules
  • Updated docs/_ext/argparse_exemplar.py
  • Updated docs/_static/css/argparse-highlight.css
  • Updated tests in tests/docs/_ext/

Reference

  • tmuxp#1010
  • tmuxp#1011

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.44%. Comparing base (07ba36a) to head (be9e54c).
⚠️ Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
docs/_ext/sphinx_argparse_neo/nodes.py 82.05% 7 Missing ⚠️
docs/_ext/argparse_exemplar.py 50.00% 1 Missing ⚠️
docs/_ext/sphinx_argparse_neo/renderer.py 95.65% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tony added 5 commits January 25, 2026 07:36
- 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
@tony
Copy link
Member Author

tony commented Jan 25, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

tony added 6 commits January 25, 2026 09:08
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
@tony tony changed the title docs: Port CLI documentation improvements from tmuxp#1010 docs: Port CLI documentation improvements from tmuxp#1010 and #1011 Jan 25, 2026
tony added 3 commits January 25, 2026 13:02
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".
@tony tony merged commit 0d9e615 into master Jan 25, 2026
10 of 11 checks passed
@tony tony deleted the more-cli-docs branch January 25, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants