Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipart.py type annotations mismatch documentation #3621

Closed
kornicameister opened this issue Feb 23, 2019 · 4 comments
Closed

multipart.py type annotations mismatch documentation #3621

kornicameister opened this issue Feb 23, 2019 · 4 comments
Labels
bug documentation Improvements or additions to documentation

Comments

@kornicameister
Copy link
Contributor

Long story short

Problem lies in a mismatch between the documentation of multipart here and the actual code execution around courotines __anext__, next.

Expected behaviour

Code annotations are matching the documentation and therefore expected behavior.

Actual behaviour

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.

Your environment

  • aiohttp (3.5.4)
  • server
@kornicameister
Copy link
Contributor Author

@asvetlov since I've only "collaborated" with you in the past. I am working now on improving those annotations a bit. If you're interested I might push a patch in a day or two.

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

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 ).

@aio-libs-bot aio-libs-bot added bug documentation Improvements or additions to documentation labels Feb 23, 2019
@kornicameister
Copy link
Contributor Author

kornicameister commented Feb 23, 2019

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.

@asvetlov
Copy link
Member

Fixed by #3905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants