sphinx-doc / sphinx-doc/sphinx

Ability to disable overloaded function signatures being presented when `autodoc_typehints` is `"signature"` or `"both"`

Open
#10,359 5 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extensions:autodoc type:enhancement
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.
When the setting above is present and enabled, the build documentation presents multiple entries for ov
erloaded function signature:
Code_7hPM5g2RLm

Describe the solution you'd like
As discussed in #10305 I would like to request a setting to override within conf.py to disable this functionality only.

Describe alternatives you've considered
Due to the overloaded signatures being rather important, I am unsure if it would be possible to perhaps "collapse" these and only show one signature, but have a button/link present in the built documentation to reveal the overloaded signatures.
Otherwise perhaps it can

Additional context
N/A but can present anything if you need.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the autodoc_typehints setting is handled and review the related discussion in #10305. The work is complete when a conf.py setting can disable displayed overloaded signatures for the requested modes, with tests and documentation covering the behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.