Skip to content

Trim the docs configuration and show the real widget signatures - #107

Merged
pazz merged 1 commit into
mainfrom
docs-conf-cleanup
Oct 25, 2026
Merged

pazz merged 1 commit into
mainfrom
docs-conf-cleanup

Conversation

@pazz

@pazz pazz commented Oct 25, 2026

Copy link
Copy Markdown
Owner

docs/source/conf.py was the 2015 sphinx-quickstart template: 168 of its 297 lines were commented-out defaults. This keeps only the values it sets and drops those Sphinx derives from project and author (htmlhelp_basename, latex_documents, man_pages, texinfo_documents, master_doc). The hand-written MagicMock replacement for urwid becomes Sphinx's own autodoc_mock_imports.

Both mocks hid the real constructor signatures of TreeBox and TreeListWalker: the old one showed the mock's eleven parameters, the new one would show (*args: Any, **kwargs: Any). containers.rst now states them, so the docs show (tree, focus=None) for both.

Built with Sphinx 9.2 (html, man, latex, texinfo, -W), with and without urwid installed: the HTML pages are unchanged apart from those two signatures. The LaTeX, texinfo and man outputs are now titled "urwidtrees" instead of "urwidtrees Documentation", and the texinfo entry loses the quickstart placeholder's final full stop. The intersphinx link to the urwid docs now uses its current https address instead of a redirect.

Review findings and resolution

review-correctness

  • The commit message quoted the new signature as (*args, **kwargs); it renders as (*args: Any, **kwargs: Any): superseded, as the real signatures are now stated.
  • The real (tree, focus=None) signature was hidden before and after; suggested stating it in containers.rst: fixed.
  • The intersphinx URL redirects: fixed.
  • Checked without findings: the build with and without urwid, man, latex and texinfo with -W, the removed settings being defaults.

review-design

  • The message should not present the signature as a regression from a correct state: fixed, by stating the real signatures.
  • Setting author makes four output settings and master_doc redundant: done.
  • The walrus in the version line reads less plainly than a separate assignment: changed.
  • Whether to drop the mock and require urwid for doc builds: left; stating the signatures gives the same result while doc builds still need only Sphinx.
  • The Read the Docs build may be stale without a .readthedocs.yaml: handled in a separate PR.

🤖 Generated with Claude Code

Drop the commented-out sphinx-quickstart defaults and the settings that
Sphinx derives from project and author, and replace the hand-written
urwid mock with Sphinx's autodoc_mock_imports. Both mocks hid the real
constructor signatures of TreeBox and TreeListWalker, so containers.rst
now states them: (tree, focus=None).

The HTML pages are otherwise unchanged; the LaTeX, texinfo and man
outputs are now titled "urwidtrees" instead of "urwidtrees
Documentation".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pazz
pazz merged commit b1641ed into main Oct 25, 2026
4 checks passed
@pazz
pazz deleted the docs-conf-cleanup branch October 25, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant