def aaa() -> callable:
...
bbb = aaa()
reveal_type(bbb)
This shows the type of bbb to be (__obj: object) -> bool. I think it should've been Unknown since callable isn't a valid type annotation.
This could happen if aaa and bbb are inside library code you don't have control over. It's tempting to use callable as a non-generic version of typing.Callable, so this is how I found this behaviour
This shows the type of
bbbto be(__obj: object) -> bool. I think it should've beenUnknownsincecallableisn't a valid type annotation.This could happen if
aaaandbbbare inside library code you don't have control over. It's tempting to usecallableas a non-generic version oftyping.Callable, so this is how I found this behaviour