Problem lies in a mismatch between the documentation of multipart here and the actual code execution around courotines __anext__, next.
Code annotations are matching the documentation and therefore expected behavior.
As a developer, I didn't notice that multipart reader behavior is actually not as straightforward as it seemed to be. Reading the documentation again, revealed to me what should be expected in here however I would expect that mypy tells me that I need to account for that behavior.
Steps to reproduce
None that I can think of. Code works fine, only annotations need tuning.
The text was updated successfully, but these errors were encountered:
Possibly related issues are #120 (Documentation), #3230 (iter_chunks type annotation wrong), #558 (Documentation improvement), #3240 (Missing type annotations in pyi files), and #2478 (Documentation reorganizing ).
Ok, it went a bit faster. Can't exactly test that, something is off in my environment and can't quite tell what. It keeps on telling me that I should install cython although it is already installed. So fingers crossed and full transparency that I did not manage to test those out.