Skip to content

False-positive diagnostic when passing total=True to generic TypedDict with PEP-695 type parameters #2736

@HEROgold

Description

@HEROgold

Summary

I ran uvx ty check . on the root dir, one above src.
Cli version: ty 0.0.15 (eb43dff 2026-02-04)

Playground link:
https://play.ty.dev/656147fa-2f75-4f10-868c-52378fd6b1a2

any typeddict with total=False using the generic type syntax [T] triggers the error for expecing True of False, but it found Unknown. As seen in the same line of text, there is a Literal[False]
Using from typing import Generic, Typevar over [T] passes all checks without issue.

Sidenote:
This only happens on the cli. I don't get the same error on vscode, of version 2026.10.0. as mentioned on the extension page: The extension ships with ty==0.0.15.

Version

ty 0.0.15 (eb43dff 2026-02-04)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions