Say we have a function like this:
from collections.abc import Callable, Iterable
def f[T](a: Callable[[T], Iterable[list[T]]]) -> None: ...
This generates no errors:
from typing import assert_never
f(lambda a: [assert_never(True)])
It would appear there's no checking in the lambda body.
However if I change the Iterable to list:
def f[T](a: Callable[[T], list[list[T]]]) -> None: ...
Then it works, and an error is shown as expected.