matrix-nio icon indicating copy to clipboard operation
matrix-nio copied to clipboard

AsyncClient.upload has wrong type annotations for data_provider

Open baltitenger opened this issue 4 years ago • 0 comments

upload accepts a callable, SynchronousFile or AsyncFile for the data_provider parameter, but the type annotation only specifies DataProvider, which is just a Callable[[int, int], AsyncDataT]. Thus, passing a file to this function works as expected, but my type checker complains.

baltitenger avatar Jul 15 '21 20:07 baltitenger