Incorrect documentation for type aliases for `Callable`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
I have the following code using a type alias (https://docs.python.org/3/library/typing.html#type-aliases):
from typing import Callable
MyType = Callable[[str], str]
"""My function type"""
Expected Behavior
I would expect to see the documentation of MyType as a type alias, including the provided doc string
Actual Behavior
- the documentation shows the type as a class
- shows the name of the type as
Callableinstead ofMyType - shows the inherited documentation from
Callableinstead of the provided docstring
Refer to https://carsten-leue.github.io/pdoc-test/pdoc_test/#pdoc_test.Callable for an example
Steps to Reproduce
Refer to this example: https://github.com/Carsten-Leue/pdoc-test/blob/master/pdoc_test/__init__.py#L13
Additional info
- pdoc version:
0.8.3
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
Start with the reproduced example in pdoc_test/init.py at line 13 and compare its generated page at the linked pdoc_test.Callable URL. Trace how pdoc3 0.8.3 identifies the Callable alias, then verify that the rendered result uses MyType and its provided docstring rather than Callable's inherited documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100