Skip to content

docs(direct_url): render ArchiveInfo, DirInfo, VcsInfo fields via autoclass#1225

Open
r266-tech wants to merge 3 commits into
pypa:mainfrom
r266-tech:docs-direct-url-autoclass
Open

docs(direct_url): render ArchiveInfo, DirInfo, VcsInfo fields via autoclass#1225
r266-tech wants to merge 3 commits into
pypa:mainfrom
r266-tech:docs-direct-url-autoclass

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

The Reference section renders ArchiveInfo, DirInfo, and VcsInfo as bare .. class:: stubs (just the class name), even though all three are public (__all__) frozen dataclasses whose keyword-only fields the Usage example above already constructs (hashes, editable, vcs/commit_id/requested_revision).

Switching them to .. autoclass:: :members: :undoc-members: (the same pattern RawMetadata uses in metadata.rst) renders those field signatures, matching the existing DirectUrl entry just above them.

Pure docs, no code change.

@r266-tech

Copy link
Copy Markdown
Contributor Author

Pushed a fix for the red docs build. The bare autoclass directives were rendering each dataclass's auto-generated signature (ArchiveInfo(*, ...)) as its docstring, and the leading * tripped the -W docutils build ("Inline emphasis start-string without end-string"). I added a one-line docstring to ArchiveInfo/DirInfo/VcsInfo and excluded __init__/__new__ to match the existing DirectUrl directive, so the field tables now render cleanly. nox -s docs passes locally.

r266-tech and others added 2 commits June 7, 2026 10:30
The bare `autoclass` directives emitted the dataclasses' auto-generated
signature as the docstring (`ArchiveInfo(*, ...)`), which docutils parsed
as an unterminated inline-emphasis marker and failed the -W docs build.
Give each class a one-line docstring and exclude __init__/__new__ to match
the DirectUrl directive, so the field tables render without warnings.
@henryiii henryiii force-pushed the docs-direct-url-autoclass branch from 8975975 to 087638e Compare June 7, 2026 14:30
@henryiii

henryiii commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Needs reformatting.

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.

2 participants