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

MOTOR-1183 Typing issue in core.pyi causing MyPy error for to_list … #226

Merged
merged 5 commits into from
Aug 31, 2023

Conversation

imSniff
Copy link
Contributor

@imSniff imSniff commented Aug 30, 2023

Related with this ticket:
https://jira.mongodb.org/projects/MOTOR/issues/MOTOR-1183?filter=allopenissues
Here is the mypy error when it's using only List as a return value of the function to_list().
image

@imSniff imSniff requested a review from a team as a code owner August 30, 2023 12:25
@imSniff imSniff requested review from Jibola and removed request for a team August 30, 2023 12:25
motor/core.pyi Outdated Show resolved Hide resolved
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! We had missed this one and fetch_next because the original methods had a coroutine_annotation decorator instead of being async def.

@blink1073 blink1073 changed the title [MOTOR-1183] Typing issue in core.pyi causing MyPy error for to_list … MOTOR-1183 Typing issue in core.pyi causing MyPy error for to_list … Aug 31, 2023
@imSniff
Copy link
Contributor Author

imSniff commented Aug 31, 2023

Thank you! We had missed this one and fetch_next because the original methods had a coroutine_annotation decorator instead of being async def.

Thank you too, for your quickly response! I just only saw this one for the moment, but if I find another typing issues, I will let you know. :)

@blink1073 blink1073 merged commit 8a3712c into mongodb:master Aug 31, 2023
30 of 33 checks passed
@blink1073
Copy link
Member

I will release a bug fix today.

blink1073 added a commit that referenced this pull request Aug 31, 2023
…226)

Co-authored-by: Sergi Pous <spous@objectvideo.com>
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants