Skip to content

Show typing.Annotated info in tooltips #7746

@lostmsu

Description

@lostmsu

I work with PyTorch and want to be able to annotate tensor types with shapes.

I tried jaxtyping module like this:

def foo(x: jaxtyping.Float[torch.Tensor, "B T E") -> jaxtyping.Float[torch.Tensor, "B T 1"]: ...

Unfortunately, in VS Code when I hover over foo callsite or the definition, VS Code loses extra annotations:

def foo(x: Tensor) -> Tensor: ...

Metadata

Metadata

Assignees

Labels

ai-triage-respondedIndicate whether the AI triage agent has responded to this issue.team needs to reproduceIssue has not been reproduced yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions