Closed math2001 closed 5 years ago
I just looked at the source code, and saw this line. So, I had to do this:
sendch, getch = trio.open_memory_channel[sometype](0)
Was this documented somewhere I missed? Maybe it should be added to the README.
The error message that mypy produces is Need type annotation for '<name of variable>'
, which is the same error you get if you write some_list = []
in a context where mypy can't infer the type. The solution in both cases is to add the type parameter.
I agree that this error is confusing; filed #9 to track the documentation improvement that's needed here.
mypy wants
Shouldn't mypy be able to infer the types by itself?