[red-knot] Correctly identify protocol classes (#17487)

This commit is contained in:
Alex Waygood
2025-04-21 16:17:06 +01:00
committed by GitHub
parent c077b109ce
commit 9ff4772a2c
5 changed files with 90 additions and 36 deletions

View File

@@ -74,8 +74,6 @@ class Baz(Bar):
T = TypeVar("T")
class Qux(Protocol[T]):
# TODO: no error
# error: [invalid-return-type]
def f(self) -> int: ...
class Foo(Protocol):