Skip to content

docs(markers): add docstrings to Marker.__and__/__or__ so they render in the API reference - #1274

Merged
henryiii merged 1 commit into
pypa:mainfrom
r266-tech:docs-marker-and-or-docstrings
Jun 20, 2026
Merged

henryiii merged 1 commit into
pypa:mainfrom
r266-tech:docs-marker-and-or-docstrings

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

docs/markers.rst already declares :special-members: __and__, __or__, but neither operator has a docstring. As a result Sphinx autodoc drops __and__ from the rendered API Reference entirely, and renders __or__ with the inherited object.__or__ text ("Return self|value."), which describes bitwise-or rather than marker combination.

Both operators shipped in 26.1 (#1146). This adds a short docstring carrying .. versionadded:: 26.1 to each so they render correctly in the Reference.

Docstring-only; no behavior change. Refs #1239.

They shipped in 26.1 (pypa#1146) but had no docstrings, so autodoc dropped
__and__ from the API Reference and rendered __or__ with the inherited
object.__or__ text. Refs pypa#1239.
@henryiii
henryiii merged commit b61e85e into pypa:main Jun 20, 2026
69 checks passed
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