Related
I posted this on (#3661 (comment)) a couple weeks ago, but probably should've started with a new issue
Summary
A docstring that follows a TypeAlias is shown on hover
But the docstring is lost when using a type statement
And if you use TypeAliasType, you get multiple docs
Repro
Playground
from typing import TypeAlias, Literal, TypeAliasType
A: TypeAlias = Literal["1", "2"]
"""I have a doc!"""
type B = Literal["1", "2"]
"""So do I, but you cannot see me."""
C = TypeAliasType("C", Literal["1", "2"])
"""I have two docs?"""
B1: TypeAlias = B
# No docs
B2 = TypeAliasType("B2", B)
# No docs
C1: TypeAlias = C
# This has 1 doc now?
C2 = TypeAliasType("C2", C)
# No docs
# ------------------------
# Hover over these guys
A
B
C
B1
B2
C1
C2
Version
ty 0.0.79 (b4cd792 2026-09-07)
Related
I posted this on (#3661 (comment)) a couple weeks ago, but probably should've started with a new issue
Summary
A docstring that follows a
TypeAliasis shown on hoverBut the docstring is lost when using a
typestatementAnd if you use
TypeAliasType, you get multiple docsRepro
Playground
Version
ty 0.0.79 (b4cd792 2026-09-07)