Closed
Description
To Reproduce
from typing import Protocol, cast
class FooType(Protocol):
def __call__(self, ham: str) -> str:
pass
def foo(ham: str) -> str:
pass
v = cast(FooType, foo)
u: FooType = foo
Expected Behavior
I was expecting v = cast(FooType, foo)
to work about the same as v: FooType = foo # type: ignore[assignment]
with warn redundant ignores
Your Environment
See mypy-play