mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
Both typing.TypeAlias (available only in 3.10) and typing_extensions.TypeAlias names are supported. RHS values of assignments annotated with TypeAlias are always retained in stubs and injected into (if it's a string literal), regardless of whether they look similar to a well-formed type hint. It seems natural to assume that if a user employs such as specific marker as "TypeAlias" at all, they clearly indicate that the value is supposed to be a type. The inspections "Type hints definitions and usages" and "Final classes, methods and variables" properly analyse RHS of assignments annotated with TypeAlias. Type hinting inspection also reports illegal usages of TypeAlias, as it was done for other special forms in the typing module. The type of such variables themselves is Any, however they're still displayed as having the type "TypeAlias" in Quick Documentation to avoid confusion. GitOrigin-RevId: fab02f6e1060c0994e1d21201768e7b28ba7d9e0