-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
astral-sh/ruff
#22542Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation
Milestone
Description
Summary
We upgraded ty from 0.0.8 to 0.0.11 and I think this failure is causing 153/223 of our new errors. It was introduced in 0.0.10.
playground link: https://play.ty.dev/0622514b-0f00-4d0b-8ca5-c61f454650a9
"""Minimal stdlib-only repro for a `ty` failure mode."""
from __future__ import annotations
from dataclasses import dataclass
from typing import NewType
K = NewType("K", int)
@dataclass(frozen=True)
class C[T: K]:
x: T
def g(self):
...
C(x=K(0)).g() # 1. Argument to bound method `g` is incorrect: Argument type `C[K]` does not satisfy upper bound `C[T@C]` of type variable `Self` [invalid-argument-type]Version
0.0.11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation