Fix TODO related to protocols

This commit is contained in:
David Peter 2025-09-25 13:40:31 +02:00
parent a285a0cdb6
commit 1476571596
2 changed files with 2 additions and 4 deletions

View file

@ -1977,12 +1977,12 @@ from typing_extensions import TypeVar, Self, Protocol
from ty_extensions import is_equivalent_to, static_assert, is_assignable_to, is_subtype_of
class NewStyleClassScoped[T](Protocol):
def method(self: Self, input: T) -> None: ...
def method(self, input: T) -> None: ...
S = TypeVar("S")
class LegacyClassScoped(Protocol[S]):
def method(self: Self, input: S) -> None: ...
def method(self, input: S) -> None: ...
# TODO: these should pass
static_assert(is_equivalent_to(NewStyleClassScoped, LegacyClassScoped)) # error: [static-assert-error]