-
yellow2
is 100% expected behavior. You are explicitly telling the type checker that this variable can refer to any callable that takes any number of arguments of any type and returns astr
. If that isn’t what you, don’t write that down. -
yellow3
. I guess the highlighter could special case such protocols. But that isn’t something that is really all that useful to raise as an issue here, go tell the devs of the tool you are using.
↧
Closures and type hints (in VS Code)
↧