patrick-kidger / patrick-kidger/jaxtyping

invalid-type-form when using ty

Open
#336 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
1.9k
Forks
96
PR merge metrics
No merged PRs in 30d

Description

I'm using ty as my language server and I get the following error for Key (from jaxtyping import Key):

`typing.Annotated` requires at least two arguments when used in a type expression ty([invalid-type-form](https://ty.dev/rules#invalid-type-form))

is it necessary to annotate key with array? like Key[Array, "s1 s2"]?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the definition and intended usage of Key imported from jaxtyping, then compare it with ty's invalid-type-form diagnostic for typing.Annotated. Done means determining whether Key is valid as written and documenting or correcting the supported annotation form.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.