(📚) What do all the symbols mean in the output of `reveal_type`
Open
Nobody has claimed this yet.
documentation
priority-0-high
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Documentation
reveal_type("shaking") # Literal["shaking"]?
reveal_type(int("1")) # builtins.int*
from typing import TypeVar
T = TypeVar("T")
def foo(t: T) -> T:
reveal_type(t) # T`-1
What do all these wacky symbols mean *, ? and
`-1
I'm guessing there might be others as well.
I looked through the docs and couldn't find anything about it.
Also <: and :>, maybe also def(int) -> str and def().
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 reveal_type examples in the issue and inspect the existing mypy documentation for type-display output. Determine the meaning of the shown symbols and identify any additional symbols that should be covered. Done means the documentation explains the notation, including *, ?, -1, <: and :>.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100