sphinx-doc / sphinx-doc/sphinx
Support word wrapping for types
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
This request is to support word wrapping in types for parameters/attributes/...
Describe the solution you'd like
"""...
Parameters
----------
choices: Union[Dict[:class:`str`, Union[:class:`str`, :class:`int`, :class:`float`]],
Iterable[Union[:class:`str`, :class:`int`, :class:`float`]]]
A list of choices that a user must choose.
...
"""
Describe alternatives you've considered
I am aware type aliases are possible, but sometimes it is not worth making a whole alias for one type.
Additional context

This is the current result, a - in the middle where the wrap took place.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reproducing the displayed wrapping with the long Python type in a Sphinx-generated document, then trace how parameter and attribute types are rendered and wrapped. Done means long types wrap without inserting a hyphen in the middle while preserving existing type formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100